aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/platform.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index f9c903ba9fcd..30480f6f2af2 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -611,8 +611,15 @@ EXPORT_SYMBOL_GPL(platform_bus_type);
611 611
612int __init platform_bus_init(void) 612int __init platform_bus_init(void)
613{ 613{
614 device_register(&platform_bus); 614 int error;
615 return bus_register(&platform_bus_type); 615
616 error = device_register(&platform_bus);
617 if (error)
618 return error;
619 error = bus_register(&platform_bus_type);
620 if (error)
621 device_unregister(&platform_bus);
622 return error;
616} 623}
617 624
618#ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK 625#ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK