[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201030013425.54041-1-miaoqinglang@huawei.com>
Date: Fri, 30 Oct 2020 09:34:25 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Antti Palosaari <crope@....fi>,
Mauro Carvalho Chehab <mchehab@...nel.org>
CC: <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Qinglang Miao" <miaoqinglang@...wei.com>
Subject: [PATCH] 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@...wei.com>
---
drivers/media/usb/dvb-usb-v2/zd1301.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c
index ba2c1b0d3..72aa6a9a9 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;
--
2.23.0
Powered by blists - more mailing lists