summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-07-14 13:57:32 +0300
committerChristoph Hellwig <hch@lst.de>2020-07-29 07:45:18 +0200
commiteca9e8271e596b73e3ccefdcd26eb85b46b21a34 (patch)
tree6a95b8361c900b81f5300abaadec9c5ce34e3521 /drivers/nvme
parentc5be1f2c5bab1538aa29cd42e226d6b80391e3ff (diff)
nvme: remove an unnecessary condition
"v" is an unsigned int so it can't be more than UINT_MAX. Removing this check makes it easier to preserve the error code as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 3d00ea4e7146..5fb5e8ba531b 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3586,8 +3586,8 @@ static ssize_t nvme_ctrl_reconnect_delay_store(struct device *dev,
int err;
err = kstrtou32(buf, 10, &v);
- if (err || v > UINT_MAX)
- return -EINVAL;
+ if (err)
+ return err;
ctrl->opts->reconnect_delay = v;
return count;