From: Tong Zhang <ztong0001@gmail.com>
To: danil.kipnis@cloud.ionos.com, jinpu.wang@cloud.ionos.com,
axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: ztong0001@gmail.com
Subject: [PATCH] rnbd: fix uninitialized variable
Date: Mon, 24 Aug 2020 15:43:22 -0400 [thread overview]
Message-ID: <20200824194322.337375-1-ztong0001@gmail.com> (raw)
variable err is uninitialized when bio is an error code
Signed-off-by: Tong Zhang <ztong0001@gmail.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
next reply other threads:[~2020-08-24 19:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 19:43 Tong Zhang [this message]
2020-08-24 19:45 ` Jens Axboe
2020-08-24 19:46 ` Tong Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200824194322.337375-1-ztong0001@gmail.com \
--to=ztong0001@gmail.com \
--cc=axboe@kernel.dk \
--cc=danil.kipnis@cloud.ionos.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®