can: mcp251x: mcp251x_can_probe(): add missing unregister_candev() in error path
stable inclusion from stable-v5.10.153 commit 0eb19ecbd0a97304e8fa400c34c9e076ac35661f category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0eb19ecbd0a97304e8fa400c34c9e076ac35661f -------------------------------- [ Upstream commit b1a09b63 ] 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: 2d52dabb ("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> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Lipeng Sang <sanglipeng1@jd.com>
Loading
Please sign in to comment