diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 27988045b48e97ab103238887b8175956e1f83fa..fa99b94b9dbb633479633d55c0ccb1f57a2d2a56 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)) {