summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/block/rbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 27988045b48..fa99b94b9db 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2258,8 +2258,8 @@ static int rbd_dev_snaps_register(struct rbd_device *rbd_dev)
int ret = 0;
dout("%s called\n", __func__);
- if (!device_is_registered(&rbd_dev->dev))
- return 0;
+ if (WARN_ON(!device_is_registered(&rbd_dev->dev)))
+ return -EIO;
list_for_each_entry(snap, &rbd_dev->snaps, node) {
if (!rbd_snap_registered(snap)) {