linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH 2/2] nvme: pci: Do not initialize local_var
Date: Fri, 12 Apr 2019 00:52:39 +0900	[thread overview]
Message-ID: <20190411155239.1094-3-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <20190411155239.1094-1-minwoo.im.dev@gmail.com>

Variable "n" will be assigned once kstrtoint() succeeds, otherwise it
will not be referred because kstrtoint() will return an error which
means go out from this function.

Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 1a7f44924e0f..db894d4a37b6 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -146,7 +146,7 @@ static int io_queue_depth_set(const char *val, const struct kernel_param *kp)
 
 static int queue_count_set(const char *val, const struct kernel_param *kp)
 {
-	int n = 0, ret;
+	int n, ret;
 
 	ret = kstrtoint(val, 10, &n);
 	if (ret)
-- 
2.17.1

  parent reply	other threads:[~2019-04-11 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190411155300epcas5p49adfec0820281f7c3fd918ba59d9cf7d@epcms2p1>
2019-04-11 15:52 ` [PATCH 0/2] nvme: pci: Fix queue_count parameter Minwoo Im
2019-04-11 15:52   ` [PATCH 1/2] nvme: pci: Return -EINVAL if given nr_queue larger than nr_cpu Minwoo Im
2019-04-24 16:31     ` Sagi Grimberg
2019-04-25  0:57       ` Minwoo Im
2019-04-11 15:52   ` Minwoo Im [this message]
2019-04-24 16:32     ` [PATCH 2/2] nvme: pci: Do not initialize local_var Sagi Grimberg
2019-04-24 18:05       ` Minwoo Im
2019-04-25  1:05         ` Minwoo Im
2019-04-30 15:31     ` Christoph Hellwig
2019-04-15 22:30   ` [PATCH 0/2] nvme: pci: Fix queue_count parameter Minwoo Im

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=20190411155239.1094-3-minwoo.im.dev@gmail.com \
    --to=minwoo.im.dev@gmail.com \
    /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).