Merge tag 'io_uring-5.14-2021-07-09' of git://git.kernel.dk/linux-block
[platform/kernel/linux-starfive.git] / sound / ppc / daca.c
index 1eb698d..4da9278 100644 (file)
@@ -84,7 +84,8 @@ static int daca_get_deemphasis(struct snd_kcontrol *kcontrol,
 {
        struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
        struct pmac_daca *mix;
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        ucontrol->value.integer.value[0] = mix->deemphasis ? 1 : 0;
        return 0;
@@ -97,7 +98,8 @@ static int daca_put_deemphasis(struct snd_kcontrol *kcontrol,
        struct pmac_daca *mix;
        int change;
 
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        change = mix->deemphasis != ucontrol->value.integer.value[0];
        if (change) {
@@ -123,7 +125,8 @@ static int daca_get_volume(struct snd_kcontrol *kcontrol,
 {
        struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
        struct pmac_daca *mix;
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        ucontrol->value.integer.value[0] = mix->left_vol;
        ucontrol->value.integer.value[1] = mix->right_vol;
@@ -138,7 +141,8 @@ static int daca_put_volume(struct snd_kcontrol *kcontrol,
        unsigned int vol[2];
        int change;
 
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        vol[0] = ucontrol->value.integer.value[0];
        vol[1] = ucontrol->value.integer.value[1];
@@ -162,7 +166,8 @@ static int daca_get_amp(struct snd_kcontrol *kcontrol,
 {
        struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
        struct pmac_daca *mix;
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        ucontrol->value.integer.value[0] = mix->amp_on ? 1 : 0;
        return 0;
@@ -175,7 +180,8 @@ static int daca_put_amp(struct snd_kcontrol *kcontrol,
        struct pmac_daca *mix;
        int change;
 
-       if (! (mix = chip->mixer_data))
+       mix = chip->mixer_data;
+       if (!mix)
                return -ENODEV;
        change = mix->amp_on != ucontrol->value.integer.value[0];
        if (change) {
@@ -248,7 +254,8 @@ int snd_pmac_daca_init(struct snd_pmac *chip)
        mix->i2c.addr = DACA_I2C_ADDR;
        mix->i2c.init_client = daca_init_client;
        mix->i2c.name = "DACA";
-       if ((err = snd_pmac_keywest_init(&mix->i2c)) < 0)
+       err = snd_pmac_keywest_init(&mix->i2c);
+       if (err < 0)
                return err;
 
        /*
@@ -257,7 +264,8 @@ int snd_pmac_daca_init(struct snd_pmac *chip)
        strcpy(chip->card->mixername, "PowerMac DACA");
 
        for (i = 0; i < ARRAY_SIZE(daca_mixers); i++) {
-               if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&daca_mixers[i], chip))) < 0)
+               err = snd_ctl_add(chip->card, snd_ctl_new1(&daca_mixers[i], chip));
+               if (err < 0)
                        return err;
        }