diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 07caf44d575..9951e66b850 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3227,7 +3227,7 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev, page_count = (u32) calc_pages_for(offset, length); pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); if (IS_ERR(pages)) - ret = PTR_ERR(pages); + return PTR_ERR(pages); ret = -ENOMEM; obj_request = rbd_obj_request_create(object_name, offset, length,