ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()
authorMarkus Elfring <[email protected]>
Wed, 6 Sep 2017 18:45:11 +0000 (20:45 +0200)
committerTakashi Iwai <[email protected]>
Thu, 7 Sep 2017 08:32:30 +0000 (10:32 +0200)
commit1f5ca8ec58eaa9d42a2474ecae335ead3f845ba1
treec5c84a119ccbfad5d578e40d7f8a73a077d4b16e
parentf804fff1361c9da30efc21721dc0ae5934413c4b
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
sound/pci/ymfpci/ymfpci.c