lkml.org 
[lkml]   [2015]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 9/9] nbd: Return error pointer directly
Date
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
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 f2c1973c486a..170c148dc036 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -280,7 +280,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) {
@@ -292,10 +292,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


\
 
 \ /
  Last update: 2015-02-12 22:01    [W:0.085 / U:6.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site