mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
rtw88: Fix an error code in rtw_debugfs_set_rsvd_page()
[ Upstream commitc9eaee0c2e] The sscanf() function returns the number of matches (0 or 1 in this case). It doesn't return error codes. We should return -EINVAL if the string is invalid Fixes:c376c1fc87("rtw88: add h2c command in debugfs") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/YE8nmatMDBDDWkjq@mwanda Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
80cff3e116
commit
00792f31a3
|
|
@ -270,7 +270,7 @@ static ssize_t rtw_debugfs_set_rsvd_page(struct file *filp,
|
||||||
|
|
||||||
if (num != 2) {
|
if (num != 2) {
|
||||||
rtw_warn(rtwdev, "invalid arguments\n");
|
rtw_warn(rtwdev, "invalid arguments\n");
|
||||||
return num;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
debugfs_priv->rsvd_page.page_offset = offset;
|
debugfs_priv->rsvd_page.page_offset = offset;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user