From: Markus Pargmann Date: Thu, 2 Apr 2015 08:11:41 +0000 (+0200) Subject: nbd: Return error pointer directly X-Git-Tag: v4.1-rc1~105^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de9ad6d4edb63e0ba5d5aae365fb3565064fc00d;p=platform%2Fkernel%2Flinux-exynos.git nbd: Return error pointer directly Signed-off-by: Markus Pargmann Acked-by: Pavel Machek Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 54bf633..39e5f7f 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -285,7 +285,7 @@ static struct request *nbd_find_request(struct nbd_device *nbd, err = wait_event_interruptible(nbd->active_wq, nbd->active_req != xreq); if (unlikely(err)) - goto out; + return ERR_PTR(err); spin_lock(&nbd->queue_lock); list_for_each_entry_safe(req, tmp, &nbd->queue_head, queuelist) { @@ -297,10 +297,7 @@ static struct request *nbd_find_request(struct nbd_device *nbd, } spin_unlock(&nbd->queue_lock); - err = -ENOENT; - -out: - return ERR_PTR(err); + return ERR_PTR(-ENOENT); } static inline int sock_recv_bvec(struct nbd_device *nbd, struct bio_vec *bvec)