[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200824194322.337375-1-ztong0001@gmail.com>
Date: Mon, 24 Aug 2020 15:43:22 -0400
From: Tong Zhang <ztong0001@...il.com>
To: danil.kipnis@...ud.ionos.com, jinpu.wang@...ud.ionos.com,
axboe@...nel.dk, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: ztong0001@...il.com
Subject: [PATCH] rnbd: fix uninitialized variable
variable err is uninitialized when bio is an error code
Signed-off-by: Tong Zhang <ztong0001@...il.com>
---
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..818eff323825 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 = bio
goto sess_dev_put;
}
--
2.25.1
Powered by blists - more mailing lists