[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1427962301-17085-10-git-send-email-mpa@pengutronix.de>
Date: Thu, 2 Apr 2015 10:11:41 +0200
From: Markus Pargmann <mpa@...gutronix.de>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-kernel@...r.kernel.org, nbd-general@...ts.sourceforge.net,
kernel@...gutronix.de, Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH 9/9] nbd: Return error pointer directly
Signed-off-by: Markus Pargmann <mpa@...gutronix.de>
Acked-by: Pavel Machek <pavel@....cz>
---
Notes:
Changes in v2:
- Remove unnecessary brackets
drivers/block/nbd.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index e41fb4ccf39a..bd8f4caf53bd 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)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists