]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8723bs: update _rtw_pktfile_read() to return error codes
authorMinu Jin <s9430939@naver.com>
Tue, 27 Jan 2026 15:38:09 +0000 (00:38 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2026 12:00:35 +0000 (13:00 +0100)
commitbc4df274dca66a8f534feff5d3e1881f3c9b9bf6
treeea16ef97fcfe47f34ba9d8dd59ade6d6c66b7109
parent1d264b88aea94c41470fb3e02caf068053396c73
staging: rtl8723bs: update _rtw_pktfile_read() to return error codes

The function _rtw_pktfile_read() currently returns a uint and clamps
the requested read length if it exceeds the remaining data. This
behavior makes it impossible to propagate error codes from internal
calls like skb_copy_bits() and leads to incomplete data processing.

This patch updates the function to:
    1. Return -EINVAL if the remaining data is less than the requested length,
       ensuring callers always get the full amount of data they expect.

    2. Propagate the negative error code from skb_copy_bits().

    3. Change the return type from uint to int to support these error codes.

To avoid breaking git bisect, this patch also updates all call sites
(set_qos, update_attrib, and rtw_xmitframe_coalesce) in the same commit.
By doing so, the error-producing function and its error-handling callers
remain in sync, preventing runtime failures at this commit point.

Signed-off-by: Minu Jin <s9430939@naver.com>
Link: https://patch.msgid.link/20260127153811.1592900-2-s9430939@naver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_xmit.c
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
drivers/staging/rtl8723bs/include/xmit_osdep.h
drivers/staging/rtl8723bs/os_dep/xmit_linux.c