From: Chuhong Yuan <hslester96@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Chuhong Yuan <hslester96@gmail.com>
Subject: [PATCH] media: go7007: fix a miss of snd_card_free
Date: Fri, 6 Dec 2019 20:07:35 +0800 [thread overview]
Message-ID: <20191206120735.21873-1-hslester96@gmail.com> (raw)
go7007_snd_init() misses a snd_card_free() in an error path.
Add the missed call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/media/usb/go7007/snd-go7007.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/go7007/snd-go7007.c b/drivers/media/usb/go7007/snd-go7007.c
index b05fa227ffb2..dced8c019514 100644
--- a/drivers/media/usb/go7007/snd-go7007.c
+++ b/drivers/media/usb/go7007/snd-go7007.c
@@ -243,6 +243,7 @@ int go7007_snd_init(struct go7007 *go)
ret = snd_device_new(gosnd->card, SNDRV_DEV_LOWLEVEL, go,
&go7007_snd_device_ops);
if (ret < 0) {
+ snd_card_free(gosnd->card);
kfree(gosnd);
return ret;
}
--
2.24.0
next reply other threads:[~2019-12-06 12:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 12:07 Chuhong Yuan [this message]
2019-12-06 14:10 ` [PATCH] media: go7007: fix a miss of snd_card_free Markus Elfring
2019-12-06 14:37 ` Chuhong Yuan
2019-12-06 17:00 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191206120735.21873-1-hslester96@gmail.com \
--to=hslester96@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox