linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH] nvme-rdma: initialize ret to zero to avoid returning garbage
Date: Tue, 16 Aug 2016 12:06:18 +0300	[thread overview]
Message-ID: <9d8071d3-aa97-f963-4246-a4872c83a927@grimberg.me> (raw)
In-Reply-To: <1471335879-6088-1-git-send-email-colin.king@canonical.com>



On 16/08/16 11:24, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> ret is not initialized so it contains garbage.  Ensure garbage
> is not returned by initializing rc to 0.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  drivers/nvme/host/rdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 8d2875b..9c69393 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -1319,7 +1319,7 @@ out_destroy_queue_ib:
>  static int nvme_rdma_device_unplug(struct nvme_rdma_queue *queue)
>  {
>  	struct nvme_rdma_ctrl *ctrl = queue->ctrl;
> -	int ret;
> +	int ret = 0;
>
>  	/* Own the controller deletion */
>  	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_DELETING))
>

Applied for the next round of rc fixes.

Thanks Colin.

      reply	other threads:[~2016-08-16  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16  8:24 [PATCH] nvme-rdma: initialize ret to zero to avoid returning garbage Colin King
2016-08-16  9:06 ` Sagi Grimberg [this message]

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=9d8071d3-aa97-f963-4246-a4872c83a927@grimberg.me \
    --to=sagi@grimberg.me \
    /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;
as well as URLs for NNTP newsgroup(s).