Skip to content

Commit

Permalink
nvme-pci: remove an unneeded variable initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Minwoo Im authored and Christoph Hellwig committed May 1, 2019
1 parent c8e9e9b commit 6656486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6656486

Please sign in to comment.