From: Ilya Dryomov Date: Fri, 13 Dec 2013 13:28:57 +0000 (+0200) Subject: rbd: refactor rbd_init() a bit X-Git-Tag: v3.14-rc1~71^2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1b4d96dea61c3078775090e8b121f571aab8fda;p=kernel%2Fkernel-generic.git rbd: refactor rbd_init() a bit Refactor rbd_init() a bit to make it more clear what's going on. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Reviewed-by: Josh Durgin --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d743900..8b78a08 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5292,18 +5292,22 @@ static int __init rbd_init(void) if (!libceph_compatible(NULL)) { rbd_warn(NULL, "libceph incompatibility (quitting)"); - return -EINVAL; } + rc = rbd_slab_init(); if (rc) return rc; + rc = rbd_sysfs_init(); if (rc) - rbd_slab_exit(); - else - pr_info("loaded\n"); + goto err_out_slab; + pr_info("loaded\n"); + return 0; + +err_out_slab: + rbd_slab_exit(); return rc; }