can: softing: softing_netdev_open(): fix error handling
authorZhang Qilong <zhangqilong3@huawei.com>
Fri, 4 Dec 2020 13:35:06 +0000 (14:35 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Dec 2020 21:08:11 +0000 (13:08 -0800)
commit4d1be581ec6b92a338bb7ed23e1381f45ddf336f
treeae785fa14e5135aec7ed2fc9f6c5b00bb736960d
parenta54ba3465d86fa5dd7d41bb88c0b5e71fb3b627e
can: softing: softing_netdev_open(): fix error handling

If softing_netdev_open() fails, we should call close_candev() to avoid
reference leak.

Fixes: 03fd3cf5a179d ("can: add driver for Softing card")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Link: https://lore.kernel.org/r/20201202151632.1343786-1-zhangqilong3@huawei.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20201204133508.742120-2-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/can/softing/softing_main.c