aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/nbd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index ef57e7d83aed..54bf633c9013 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -249,7 +249,7 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req)
249 if (result <= 0) { 249 if (result <= 0) {
250 dev_err(disk_to_dev(nbd->disk), 250 dev_err(disk_to_dev(nbd->disk),
251 "Send control failed (result %d)\n", result); 251 "Send control failed (result %d)\n", result);
252 goto error_out; 252 return -EIO;
253 } 253 }
254 254
255 if (nbd_cmd(req) == NBD_CMD_WRITE) { 255 if (nbd_cmd(req) == NBD_CMD_WRITE) {
@@ -270,14 +270,11 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req)
270 dev_err(disk_to_dev(nbd->disk), 270 dev_err(disk_to_dev(nbd->disk),
271 "Send data failed (result %d)\n", 271 "Send data failed (result %d)\n",
272 result); 272 result);
273 goto error_out; 273 return -EIO;
274 } 274 }
275 } 275 }
276 } 276 }
277 return 0; 277 return 0;
278
279error_out:
280 return -EIO;
281} 278}
282 279
283static struct request *nbd_find_request(struct nbd_device *nbd, 280static struct request *nbd_find_request(struct nbd_device *nbd,