ALSA: bt87x: Fix assignment in if condition
authorTakashi Iwai <tiwai@suse.de>
Tue, 8 Jun 2021 14:04:55 +0000 (16:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 Jun 2021 15:29:53 +0000 (17:29 +0200)
PCI BT87x driver code contains an 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-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/bt87x.c

index 91512b345d19b78b38e3baa6c82913b31f4cc9a9..39bcfb81e81c8ac2348291f4d950a0558afb8338 100644 (file)
@@ -719,7 +719,8 @@ static int snd_bt87x_create(struct snd_card *card,
        chip->irq = -1;
        spin_lock_init(&chip->reg_lock);
 
-       if ((err = pci_request_regions(pci, "Bt87x audio")) < 0) {
+       err = pci_request_regions(pci, "Bt87x audio");
+       if (err < 0) {
                kfree(chip);
                pci_disable_device(pci);
                return err;