summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLevente Kurusa <levex@linux.com>2013-12-19 16:06:49 +0100
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-04 09:27:38 +0100
commit38121b6ef314e556d3b59acc0c41a4d6f7e597fa (patch)
tree0722020d579b2717801d13201f48c6d7033d3fa7 /drivers
parent[media] exynos4-is: Compile in fimc-lite runtime PM callbacks conditionally (diff)
downloadlinux-38121b6ef314e556d3b59acc0c41a4d6f7e597fa.tar.xz
linux-38121b6ef314e556d3b59acc0c41a4d6f7e597fa.zip
[media] media: bt8xx: add missing put_device call
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> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/bt8xx/bttv-gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-gpio.c b/drivers/media/pci/bt8xx/bttv-gpio.c
index 922e8233fd0b..3f364b7062b9 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));