Re: [PATCH] rnbd: Fix an error code in process_rdma()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/26/20 13:32, Dan Carpenter wrote:
The error code is uninitialized on this error path.

Fixes: 735d77d4fd28 ("rnbd: remove rnbd_dev_submit_io")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
  drivers/block/rnbd/rnbd-srv.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
index 0fb94843a495..5b69bc56b225 100644
--- a/drivers/block/rnbd/rnbd-srv.c
+++ b/drivers/block/rnbd/rnbd-srv.c
@@ -149,6 +149,7 @@ static int process_rdma(struct rtrs_srv *sess,
  	bio = rnbd_bio_map_kern(data, sess_dev->rnbd_dev->ibd_bio_set, datalen, GFP_KERNEL);
  	if (IS_ERR(bio)) {
  		rnbd_srv_err(sess_dev, "Failed to generate bio, err: %ld\n", PTR_ERR(bio));
+		err = PTR_ERR(bio);
  		goto sess_dev_put;
  	}

Thanks for the fix, Acked-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx>

Guoqing



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux