projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5be1f2
)
nvme: remove an unnecessary condition
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 14 Jul 2020 10:57:32 +0000
(13:57 +0300)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 29 Jul 2020 05:45:18 +0000
(07:45 +0200)
"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>
drivers/nvme/host/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index 3d00ea4e7146ee02f0ebfffeb806d1bf8975b725..5fb5e8ba531b63e72f09e6ed0e01003b5c952e5a 100644
(file)
--- 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;