Skip to content

Commit eca9e82

Browse files
Dan CarpenterChristoph Hellwig
authored andcommitted
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 <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent c5be1f2 commit eca9e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3586,8 +3586,8 @@ static ssize_t nvme_ctrl_reconnect_delay_store(struct device *dev,
35863586
int err;
35873587

35883588
err = kstrtou32(buf, 10, &v);
3589-
if (err || v > UINT_MAX)
3590-
return -EINVAL;
3589+
if (err)
3590+
return err;
35913591

35923592
ctrl->opts->reconnect_delay = v;
35933593
return count;

0 commit comments

Comments
 (0)