diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-08 16:05:33 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-09 17:30:30 +0200 |
commit | d2bc4d9ab154f911e99802347a9661dca15b2afe (patch) | |
tree | 67c88853cb5a3988c5cd77e5e2642bc6005f09ef /sound/drivers/mpu401/mpu401.c | |
parent | ALSA: sparc: Fix assignment in if condition (diff) | |
download | linux-d2bc4d9ab154f911e99802347a9661dca15b2afe.tar.xz linux-d2bc4d9ab154f911e99802347a9661dca15b2afe.zip |
ALSA: mpu401: Fix assignment in if condition
MPU401 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-60-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/mpu401/mpu401.c')
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 8c552e25805a..d0b55dbb411a 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -104,7 +104,8 @@ static int snd_mpu401_probe(struct platform_device *devptr) err = snd_mpu401_create(&devptr->dev, dev, &card); if (err < 0) return err; - if ((err = snd_card_register(card)) < 0) { + err = snd_card_register(card); + if (err < 0) { snd_card_free(card); return err; } @@ -182,7 +183,8 @@ static int snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev, err = snd_mpu401_create(&pnp_dev->dev, dev, &card); if (err < 0) return err; - if ((err = snd_card_register(card)) < 0) { + err = snd_card_register(card); + if (err < 0) { snd_card_free(card); return err; } @@ -227,7 +229,8 @@ static int __init alsa_card_mpu401_init(void) { int i, err; - if ((err = platform_driver_register(&snd_mpu401_driver)) < 0) + err = platform_driver_register(&snd_mpu401_driver); + if (err < 0) return err; for (i = 0; i < SNDRV_CARDS; i++) { |