nvme-pci: remove an unneeded variable initialization
authorMinwoo Im <minwoo.im.dev@gmail.com>
Thu, 11 Apr 2019 15:52:39 +0000 (00:52 +0900)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 May 2019 13:17:27 +0000 (09:17 -0400)
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@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c

index ac10d3a..e2ff92d 100644 (file)
@@ -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)