variable err is uninitialized when bio is an error code Signed-off-by: Tong Zhang <ztong0001@xxxxxxxxx> --- 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