diff options
author | Levente Kurusa <levex@linux.com> | 2013-12-19 12:06:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-02-04 06:27:38 -0200 |
commit | 38121b6ef314e556d3b59acc0c41a4d6f7e597fa (patch) | |
tree | 0722020d579b2717801d13201f48c6d7033d3fa7 /drivers | |
parent | 656e62dc84a38fa847d9501636acb098a32d6f89 (diff) | |
download | linux-38121b6ef314e556d3b59acc0c41a4d6f7e597fa.tar.gz linux-38121b6ef314e556d3b59acc0c41a4d6f7e597fa.tar.bz2 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.c | 2 |
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)); |