bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
The sunxi_rsb_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, the sunxi_rsb_bus is not unregistered. Fix by unregister sunxi_rsb_bus when platform_driver_register() failed. Fixes: d787dcdb ("bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus") Signed-off-by:Yuan Can <yuancan@huawei.com> Reviewed-by:
Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20221123094200.12036-1-yuancan@huawei.comSigned-off-by:
Jernej Skrabec <jernej.skrabec@gmail.com>
Showing
Please register or sign in to comment