mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
qlogic: check kstrtoul() for errors
We accidentally left out the error handling for kstrtoul().
Fixes: a520030e32
("qlcnic: Implement flash sysfs callback for 83xx adapter")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c3086637b0
commit
5fc853cc01
@ -1128,6 +1128,8 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp,
|
||||
struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
|
||||
|
||||
ret = kstrtoul(buf, 16, &data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (data) {
|
||||
case QLC_83XX_FLASH_SECTOR_ERASE_CMD:
|
||||
|
Loading…
Reference in New Issue
Block a user