diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 641f09898e19..b0f6812f8f99 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -2564,19 +2564,21 @@ static int rbd_sysfs_init(void) | |||
2564 | { | 2564 | { |
2565 | int ret; | 2565 | int ret; |
2566 | 2566 | ||
2567 | ret = bus_register(&rbd_bus_type); | 2567 | ret = device_register(&rbd_root_dev); |
2568 | if (ret < 0) | 2568 | if (ret < 0) |
2569 | return ret; | 2569 | return ret; |
2570 | 2570 | ||
2571 | ret = device_register(&rbd_root_dev); | 2571 | ret = bus_register(&rbd_bus_type); |
2572 | if (ret < 0) | ||
2573 | device_unregister(&rbd_root_dev); | ||
2572 | 2574 | ||
2573 | return ret; | 2575 | return ret; |
2574 | } | 2576 | } |
2575 | 2577 | ||
2576 | static void rbd_sysfs_cleanup(void) | 2578 | static void rbd_sysfs_cleanup(void) |
2577 | { | 2579 | { |
2578 | device_unregister(&rbd_root_dev); | ||
2579 | bus_unregister(&rbd_bus_type); | 2580 | bus_unregister(&rbd_bus_type); |
2581 | device_unregister(&rbd_root_dev); | ||
2580 | } | 2582 | } |
2581 | 2583 | ||
2582 | int __init rbd_init(void) | 2584 | int __init rbd_init(void) |