mirror_ubuntu-kernels/drivers/net/wireless/realtek/rtlwifi
Wei Chen 5dbe1f8eb8 wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg()
If there is a failure during copy_from_user or user-provided data buffer is
invalid, rtl_debugfs_set_write_reg should return negative error code instead
of a positive value count.

Fix this bug by returning correct error code. Moreover, the check of buffer
against null is removed since it will be handled by copy_from_user.

Fixes: 610247f46f ("rtlwifi: Improve debugging by using debugfs")
Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230326054217.93492-1-harperchen1110@gmail.com
2023-03-31 17:51:33 +03:00
..
btcoexist wifi: rtlwifi: btcoexist: fix conditions branches that are never executed 2022-12-08 16:52:56 +02:00
rtl8188ee wifi: rtlwifi: rtl8188ee: don't call kfree_skb() under spin_lock_irqsave() 2022-12-14 14:20:38 +02:00
rtl8192c rtlwifi: rtl8192c-common: fix bool comparison in expressions 2021-01-25 16:21:05 +02:00
rtl8192ce wifi: rtlwifi: rtl8192ce: fix dealing empty EEPROM values 2023-02-22 14:28:08 +02:00
rtl8192cu rtlwifi: rtl8192cu: Fix spelling mistake "writting" -> "writing" 2022-04-12 16:56:12 +03:00
rtl8192de wifi: rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable 2023-02-22 14:30:04 +02:00
rtl8192ee wifi: rtlwifi: rtl8192ee: remove static variable stop_report_cnt 2022-11-04 13:00:16 +02:00
rtl8192se wifi: rtlwifi: rtl8192se: Remove some unused variables 2023-03-06 12:10:06 +02:00
rtl8723ae wifi: rtlwifi: rtl8723ae: fix obvious spelling error tyep->type 2023-01-16 18:21:32 +02:00
rtl8723be wifi: rtlwifi: rtl8723be: don't call kfree_skb() under spin_lock_irqsave() 2022-12-14 14:20:38 +02:00
rtl8723com
rtl8821ae wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit() 2022-12-14 14:26:51 +02:00
base.c mac80211: prepare sta handling for MLO support 2022-04-11 16:42:03 +02:00
base.h net: rtlwifi: Remove void* casts related to delayed work 2020-09-29 14:02:55 -07:00
cam.c rtlwifi: remove redundant initialization of variable ul_encalgo 2022-02-01 14:26:34 +02:00
cam.h
core.c wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
core.h rtlwifi: implement set_tim by update beacon content 2021-04-21 12:39:33 +03:00
debug.c wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg() 2023-03-31 17:51:33 +03:00
debug.h net: rtlwifi: Remove in_interrupt() from debug macro 2020-09-29 14:02:55 -07:00
efuse.c
efuse.h
Kconfig
Makefile
pci.c wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
pci.h
ps.c rtlwifi: rtl_pci: fix bool comparison in expressions 2021-01-25 16:21:01 +02:00
ps.h net: rtlwifi: Replace in_interrupt() for context detection 2020-09-29 14:02:55 -07:00
pwrseqcmd.h
rc.c mac80211: prepare sta handling for MLO support 2022-04-11 16:42:03 +02:00
rc.h
regd.c wifi: rtlwifi: fix repeated words in comments 2022-07-18 15:11:09 +03:00
regd.h
stats.c
stats.h
usb.c rtlwifi: Use pr_warn instead of WARN_ONCE 2022-05-13 09:19:44 +03:00
usb.h
wifi.h wifi: rtlwifi: Replace fake flex-array with flex-array member 2023-03-31 17:49:40 +03:00