Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: fix incorrect type for ret

The variable ret is declared as a u32 type, but it is assigned a value
of -EOPNOTSUPP. Since unsigned types cannot correctly represent negative
values, the type of ret should be changed to int.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://patch.msgid.link/20250825022911.139377-1-liaoyuanhong@vivo.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Liao Yuanhong and committed by
Johannes Berg
a33b375a 9cb83d4b

+1 -1
+1 -1
net/mac80211/driver-ops.h
··· 1416 1416 struct ieee80211_sub_if_data *sdata, 1417 1417 struct cfg80211_ftm_responder_stats *ftm_stats) 1418 1418 { 1419 - u32 ret = -EOPNOTSUPP; 1419 + int ret = -EOPNOTSUPP; 1420 1420 1421 1421 might_sleep(); 1422 1422 lockdep_assert_wiphy(local->hw.wiphy);