提交 7559d13c 编写于 作者: S Shuah Khan 提交者: Mauro Carvalho Chehab

[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: NShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 614b4384
...@@ -2029,7 +2029,6 @@ int au0828_analog_register(struct au0828_dev *dev, ...@@ -2029,7 +2029,6 @@ int au0828_analog_register(struct au0828_dev *dev,
} }
if (!(dev->isoc_in_endpointaddr)) { if (!(dev->isoc_in_endpointaddr)) {
pr_info("Could not locate isoc endpoint\n"); pr_info("Could not locate isoc endpoint\n");
kfree(dev);
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册