Skip to content

Commit 6e32c29

Browse files
Dan CarpenterZhengShunQian
authored andcommitted
qlogic: check kstrtoul() for errors
[ Upstream commit 5fc853c ] We accidentally left out the error handling for kstrtoul(). Fixes: a520030 ("qlcnic: Implement flash sysfs callback for 83xx adapter") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9e0e48d commit 6e32c29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,8 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp,
11281128
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
11291129

11301130
ret = kstrtoul(buf, 16, &data);
1131+
if (ret)
1132+
return ret;
11311133

11321134
switch (data) {
11331135
case QLC_83XX_FLASH_SECTOR_ERASE_CMD:

0 commit comments

Comments
 (0)