Commit 5fc853cc authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

qlogic: check kstrtoul() for errors

We accidentally left out the error handling for kstrtoul().

Fixes: a520030e ("qlcnic: Implement flash sysfs callback for 83xx adapter")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3086637
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment