mirror of
https://github.com/torvalds/linux.git
synced 2024-10-25 14:40:58 +00:00
media: usb: dvb-usb-v2: zd1301: fix missing platform_device_unregister()
Add the missing platform_device_unregister() before return from zd1301_frontend_attach in the error handling case when pdev->dev.driver is empty. There's an error handling route named err_platform_device_unregister, so just reuse it. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
72e637fec5
commit
ee50d6e60d
|
@ -150,7 +150,7 @@ static int zd1301_frontend_attach(struct dvb_usb_adapter *adap)
|
|||
}
|
||||
if (!pdev->dev.driver) {
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
goto err_platform_device_unregister;
|
||||
}
|
||||
if (!try_module_get(pdev->dev.driver->owner)) {
|
||||
ret = -ENODEV;
|
||||
|
|
Loading…
Reference in New Issue
Block a user