Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1717707
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() |
| Date | 2017-08-22 21:20 +0200 |
| Message-ID | <uhmSw-6HP-75@gated-at.bofh.it> (permalink) |
| References | <uhltn-5B5-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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);
> - return err;
> + goto disable_device;
> }
[ snip ]
> @@ -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;
Why is this "goto exit" here? It's leaking now.
> +free_chip:
> + snd_via82xx_free(chip);
> +exit:
> + return err;
> }
regards,
dan carpenter
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 19:50 +0200
Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() Takashi Iwai <tiwai@suse.de> - 2017-08-22 20:00 +0200
Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-22 21:20 +0200
Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 22:10 +0200
Re: [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-22 22:20 +0200
Re: [alsa-devel] [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create() Takashi Iwai <tiwai@suse.de> - 2017-08-22 22:20 +0200
csiph-web