[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5ha82rs6ck.wl-tiwai@suse.de>
Date: Tue, 22 Aug 2017 22:19:39 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: SF Markus Elfring <elfring@...rs.sourceforge.net>,
alsa-devel@...a-project.org, kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Julia Lawall <Julia.Lawall@...6.fr>
Subject: Re: [alsa-devel] [PATCH] ALSA: via82xx: Use common error handling code in snd_via82xx_create()
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)) < 0) {
> > >> kfree(chip);
> > >> - pci_disable_device(pci);
> > >> - return err;
> > >> + goto disable_device;
>
> Ah, you're right. It's not leaking. I thought you deleted the
> kfree(chip);...
Well, this also suggests something wrong by the patch...
If you can't achieve it cleanly, better not to touch it in a
half-baked way.
Takashi
Powered by blists - more mailing lists