mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
qlogic: check kstrtoul() for errors
[ Upstream commit5fc853cc01] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
75425326b8
commit
bf106eaa18
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user