OpenCloudOS-Kernel/drivers/net/can/spi
Dongliang Mu b1a09b6368 can: mcp251x: mcp251x_can_probe(): add missing unregister_candev() in error path
In mcp251x_can_probe(), if mcp251x_gpio_setup() fails, it forgets to
unregister the CAN device.

Fix this by unregistering can device in mcp251x_can_probe().

Fixes: 2d52dabbef ("can: mcp251x: add GPIO support")
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/all/20221024090256.717236-1-dzm91@hust.edu.cn
[mkl: adjust label]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-10-25 09:13:14 +02:00
..
mcp251xfd can: mcp251xfd: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:30 +02:00
Kconfig can: mcp251xfd: rename driver files and subdir to mcp251xfd 2020-09-30 21:54:30 +02:00
Makefile can: mcp251xfd: rename driver files and subdir to mcp251xfd 2020-09-30 21:54:30 +02:00
hi311x.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
mcp251x.c can: mcp251x: mcp251x_can_probe(): add missing unregister_candev() in error path 2022-10-25 09:13:14 +02:00