OSDN Git Service

media: usb: dvb-usb-v2: zd1301: fix missing platform_device_unregister()
authorQinglang Miao <miaoqinglang@huawei.com>
Fri, 30 Oct 2020 01:34:25 +0000 (02:34 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 17 Nov 2020 05:57:29 +0000 (06:57 +0100)
commitee50d6e60d9a8e110e984cdd9e788d93eff540ba
tree3b5e800329b0adbae96c41f1934bf3dfcbfb3d60
parent72e637fec558c7842d6f1508f480fd77c20afe3a
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>
drivers/media/usb/dvb-usb-v2/zd1301.c