summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-05-17 14:48:44 +0300
committerKalle Valo <kvalo@kernel.org>2022-05-30 14:17:26 +0300
commitb88d28146c30a8e14f0f012d56ebf19b68a348f4 (patch)
treeb9f66765613d44372060821166570861116df871 /drivers/net/wireless/microchip
parent89d8f53ff6e729907af77f09f48eca9854295c91 (diff)
downloadlinux-b88d28146c30a8e14f0f012d56ebf19b68a348f4.tar.xz
wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c()
If the copy_from_user() fails or the user gives invalid date then the correct thing to do is to return a negative error code. (Currently it returns success). I made a copy additional related cleanups: 1) There is no need to check "buffer" for NULL. That's handled by copy_from_user(). 2) The "h2c_len" variable cannot be negative because it is unsigned and because sscanf() does not return negative error codes. Fixes: 610247f46feb ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/YoOLnDkHgVltyXK7@kili
Diffstat (limited to 'drivers/net/wireless/microchip')
0 files changed, 0 insertions, 0 deletions