Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-11-18 Thread SF Markus Elfring
>> @@ -1153,6 +1150,14 @@ static int snd_via82xx_create(struct snd_card *card, >> >> *r_via = chip; >> return 0; >> + >> +disable_device: >> +pci_disable_device(pci); >> +goto exit; >> +free_chip: >> +snd_via82xx_free(chip); >> +exit: >> +return err; > > Doubly goto doe

Re: [alsa-devel] [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread Takashi Iwai
On Tue, 22 Aug 2017 22:16:12 +0200, Dan Carpenter wrote: > > On Tue, Aug 22, 2017 at 10:05:37PM +0200, SF Markus Elfring wrote: > > >> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card > > >> *card, > > >> > > >> if ((err = pci_request_regions(pci, card->driver)) <

Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread Dan Carpenter
On Tue, Aug 22, 2017 at 10:05:37PM +0200, SF Markus Elfring wrote: > >> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card > >> *card, > >> > >>if ((err = pci_request_regions(pci, card->driver)) < 0) { > >>kfree(chip); > >> - pci_disable_device(pci); >

Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread SF Markus Elfring
>> @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card *card, >> >> if ((err = pci_request_regions(pci, card->driver)) < 0) { >> kfree(chip); >> -pci_disable_device(pci); >> -return err; >> +goto disable_device; >> } >

Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread Dan Carpenter
On Tue, Aug 22, 2017 at 07:43:08PM +0200, SF Markus Elfring wrote: > @@ -1121,30 +1121,27 @@ static int snd_via82xx_create(struct snd_card *card, > > if ((err = pci_request_regions(pci, card->driver)) < 0) { > kfree(chip); > - pci_disable_device(pci); > -

Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread Takashi Iwai
On Tue, 22 Aug 2017 19:43:08 +0200, SF Markus Elfring wrote: > > From: Markus Elfring > Date: Tue, 22 Aug 2017 19:37:26 +0200 > > Add jump targets 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

[PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()

2017-08-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Aug 2017 19:37:26 +0200 Add jump targets 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. Signed-off-by: Markus Elfring --- sound/pci/via82xx_modem.c | 33