diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-10-30 02:34:25 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-17 06:57:29 +0100 |
commit | ee50d6e60d9a8e110e984cdd9e788d93eff540ba (patch) | |
tree | 3b5e800329b0adbae96c41f1934bf3dfcbfb3d60 /drivers/media/usb | |
parent | 72e637fec558c7842d6f1508f480fd77c20afe3a (diff) |
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>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/zd1301.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c index ba2c1b0d3989..72aa6a9a9ed4 100644 --- a/drivers/media/usb/dvb-usb-v2/zd1301.c +++ b/drivers/media/usb/dvb-usb-v2/zd1301.c @@ -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; |