* [PATCH 35/38] media: bt8xx: add missing put_device call
[not found] <1387465612-3673-33-git-send-email-levex@linux.com>
@ 2013-12-19 15:06 ` Levente Kurusa
0 siblings, 0 replies; only message in thread
From: Levente Kurusa @ 2013-12-19 15:06 UTC (permalink / raw)
To: LKML; +Cc: Levente Kurusa, Mauro Carvalho Chehab, linux-media
This is required so that we give up the last reference to the device.
Remove the kfree() because the put_device() call will actually call
release_sub_device which in turn kfrees the device.
Signed-off-by: Levente Kurusa <levex@linux.com>
---
drivers/media/pci/bt8xx/bttv-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/bt8xx/bttv-gpio.c b/drivers/media/pci/bt8xx/bttv-gpio.c
index 922e823..3f364b7 100644
--- a/drivers/media/pci/bt8xx/bttv-gpio.c
+++ b/drivers/media/pci/bt8xx/bttv-gpio.c
@@ -98,7 +98,7 @@ int bttv_sub_add_device(struct bttv_core *core, char *name)
err = device_register(&sub->dev);
if (0 != err) {
- kfree(sub);
+ put_device(&sub->dev);
return err;
}
pr_info("%d: add subdevice \"%s\"\n", core->nr, dev_name(&sub->dev));
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-19 15:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1387465612-3673-33-git-send-email-levex@linux.com>
2013-12-19 15:06 ` [PATCH 35/38] media: bt8xx: add missing put_device call Levente Kurusa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox