2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

ALSA: isa: Fix assignment in if condition

ISA ES1688 and WSS  driver code contains 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-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2021-06-08 16:04:48 +02:00
parent 115c455653
commit eb767949f7
2 changed files with 8 additions and 4 deletions

View File

@ -971,7 +971,8 @@ int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip)
strcpy(card->mixername, snd_es1688_chip_id(chip));
for (idx = 0; idx < ARRAY_SIZE(snd_es1688_controls); idx++) {
if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_es1688_controls[idx], chip))) < 0)
err = snd_ctl_add(card, snd_ctl_new1(&snd_es1688_controls[idx], chip));
if (err < 0)
return err;
}
for (idx = 0; idx < ES1688_INIT_TABLE_SIZE; idx++) {

View File

@ -1493,7 +1493,8 @@ static int snd_wss_playback_open(struct snd_pcm_substream *substream)
snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.period_bytes_max);
if (chip->claim_dma) {
if ((err = chip->claim_dma(chip, chip->dma_private_data, chip->dma1)) < 0)
err = chip->claim_dma(chip, chip->dma_private_data, chip->dma1);
if (err < 0)
return err;
}
@ -1533,7 +1534,8 @@ static int snd_wss_capture_open(struct snd_pcm_substream *substream)
snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.period_bytes_max);
if (chip->claim_dma) {
if ((err = chip->claim_dma(chip, chip->dma_private_data, chip->dma2)) < 0)
err = chip->claim_dma(chip, chip->dma_private_data, chip->dma2);
if (err < 0)
return err;
}
@ -1934,7 +1936,8 @@ int snd_wss_timer(struct snd_wss *chip, int device)
tid.card = chip->card->number;
tid.device = device;
tid.subdevice = 0;
if ((err = snd_timer_new(chip->card, "CS4231", &tid, &timer)) < 0)
err = snd_timer_new(chip->card, "CS4231", &tid, &timer);
if (err < 0)
return err;
strcpy(timer->name, snd_wss_chip_id(chip));
timer->private_data = chip;