ALSA: pcmcia: Fix assignment in if condition
PCMCIA VX222 and PDAudioCF drivers contain a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-58-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Родитель
f9a6bb841f
Коммит
2073fa449d
|
@ -170,7 +170,8 @@ static int snd_pdacf_assign_resources(struct snd_pdacf *pdacf, int port, int irq
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if ((err = snd_card_register(card)) < 0)
|
||||
err = snd_card_register(card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -124,11 +124,13 @@ int vxp_add_mic_controls(struct vx_core *_chip)
|
|||
/* mic level */
|
||||
switch (_chip->type) {
|
||||
case VX_TYPE_VXPOCKET:
|
||||
if ((err = snd_ctl_add(_chip->card, snd_ctl_new1(&vx_control_mic_level, chip))) < 0)
|
||||
err = snd_ctl_add(_chip->card, snd_ctl_new1(&vx_control_mic_level, chip));
|
||||
if (err < 0)
|
||||
return err;
|
||||
break;
|
||||
case VX_TYPE_VXP440:
|
||||
if ((err = snd_ctl_add(_chip->card, snd_ctl_new1(&vx_control_mic_boost, chip))) < 0)
|
||||
err = snd_ctl_add(_chip->card, snd_ctl_new1(&vx_control_mic_boost, chip));
|
||||
if (err < 0)
|
||||
return err;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -237,9 +237,11 @@ static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw
|
|||
switch (index) {
|
||||
case 0:
|
||||
/* xilinx boot */
|
||||
if ((err = vx_check_magic(vx)) < 0)
|
||||
err = vx_check_magic(vx);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if ((err = snd_vx_load_boot_image(vx, fw)) < 0)
|
||||
err = snd_vx_load_boot_image(vx, fw);
|
||||
if (err < 0)
|
||||
return err;
|
||||
return 0;
|
||||
case 1:
|
||||
|
|
|
@ -183,7 +183,8 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq
|
|||
chip->irq = irq;
|
||||
card->sync_irq = chip->irq;
|
||||
|
||||
if ((err = snd_vx_setup_firmware(chip)) < 0)
|
||||
err = snd_vx_setup_firmware(chip);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче