]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 6 Sep 2017 18:45:11 +0000 (20:45 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Sep 2017 08:32:30 +0000 (10:32 +0200)
commit40da8ca09a0920274fa1ffedbc2cd6dcb4a2c002
treec5c84a119ccbfad5d578e40d7f8a73a077d4b16e
parent4103ea331e2d20aece33838dfd4bc2adf1723d59
ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()

* Add a jump target so that a bit of exception handling can be better
  reused at the end of this function.

  This issue was detected by using the Coccinelle software.

* The script "checkpatch.pl" pointed information out like the following.

  ERROR: do not use assignment in if condition

  Thus fix a few source code places.

[ This also fixed a potential use-after-free at error path of
  snd_opl3_hwdep_new(), too -- tiwai ]

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ymfpci/ymfpci.c