[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANhBUQ2p4hkSUgW8ZpA6+M_RsuN72E+v-XN=1a=m-Xf_++ZkdQ@mail.gmail.com>
Date: Fri, 6 Dec 2019 22:37:08 +0800
From: Chuhong Yuan <hslester96@...il.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: linux-media@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] media: go7007: fix a miss of snd_card_free
On Fri, Dec 6, 2019 at 10:11 PM Markus Elfring <Markus.Elfring@....de> wrote:
>
> > go7007_snd_init() misses a snd_card_free() in an error path.
> > Add the missed call to fix it.
>
> How do you think about to take another look also at the previous update suggestion
> “[PATCH 5/6] [media] go7007: Use common error handling code in go7007_snd_init()”?
> https://lore.kernel.org/linux-media/05efac78-3a14-803c-5b4a-68670728628b@users.sourceforge.net/
> https://lore.kernel.org/patchwork/patch/831887/
> https://lkml.org/lkml/2017/9/19/115
>
I think using goto is really much better than freeing after every error.
I will send a new version if others also agree with this pattern.
Regards,
Chuhong
> Regards,
> Markus
Powered by blists - more mailing lists