summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2014-12-21 00:24:48 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 11:56:55 -0200
commit7559d13ccf9fc4be9fb6ed21aaa4e105b6789ce8 (patch)
treece24ae6122108f5407003bf4be9099b1d1b939c6
parent614b438441fc56e384ab9ec9a836e1cb5616ea12 (diff)
downloadlinux-7559d13ccf9fc4be9fb6ed21aaa4e105b6789ce8.tar.gz
linux-7559d13ccf9fc4be9fb6ed21aaa4e105b6789ce8.tar.bz2
linux-7559d13ccf9fc4be9fb6ed21aaa4e105b6789ce8.zip
[media] media: fix au0828_analog_register() to not free au0828_dev
au0828_analog_register() frees au0828_dev when it fails to locate isoc endpoint. au0828_usb_probe() continues with dvb and rc probe and registration assuming dev is still valid. When au0828_analog_register() fails to locate isoc endpoint, it should return without free'ing au0828_dev. Otherwise, the probe will fail as dev is null when au0828_dvb_register() is called. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/usb/au0828/au0828-video.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 60a684600456..98abfd620624 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -2029,7 +2029,6 @@ int au0828_analog_register(struct au0828_dev *dev,
}
if (!(dev->isoc_in_endpointaddr)) {
pr_info("Could not locate isoc endpoint\n");
- kfree(dev);
return -ENODEV;
}