diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2015-04-02 10:11:41 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-04-02 12:39:28 -0600 |
commit | de9ad6d4edb63e0ba5d5aae365fb3565064fc00d (patch) | |
tree | db4a3b3b4a54c20b57d83fee0be5f80fbe9c9c62 /drivers/block/nbd.c | |
parent | dab5313aa4e668d87253dd4289c816cb08f63e52 (diff) | |
download | talos-obmc-linux-de9ad6d4edb63e0ba5d5aae365fb3565064fc00d.tar.gz talos-obmc-linux-de9ad6d4edb63e0ba5d5aae365fb3565064fc00d.zip |
nbd: Return error pointer directly
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 54bf633c9013..39e5f7fae3ef 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) |