summaryrefslogtreecommitdiffstats
path: root/drivers/bus/sunxi-rsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/sunxi-rsb.c')
-rw-r--r--drivers/bus/sunxi-rsb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index d3fb350dc..bf4db708f 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -783,7 +783,13 @@ static int __init sunxi_rsb_init(void)
return ret;
}
- return platform_driver_register(&sunxi_rsb_driver);
+ ret = platform_driver_register(&sunxi_rsb_driver);
+ if (ret) {
+ bus_unregister(&sunxi_rsb_bus);
+ return ret;
+ }
+
+ return 0;
}
module_init(sunxi_rsb_init);