summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-08-04 10:03:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-08 12:11:36 +0300
commit6855efbaf54a9bff0871f0acedc6c63186ae6c58 (patch)
tree37f09c1c72ba5ef76aac1b9c25df11a275d64bba /net/wireless
parentddcb56e84130fac7d73f7473afc673f14a339cf2 (diff)
downloadlinux-6855efbaf54a9bff0871f0acedc6c63186ae6c58.tar.xz
wifi: cfg80211: debugfs: fix return type in ht40allow_map_read()
[ Upstream commit d776763f48084926b5d9e25507a3ddb7c9243d5e ] The return type is supposed to be ssize_t, which is signed long, but "r" was declared as unsigned int. This means that on 64 bit systems we return positive values instead of negative error codes. Fixes: 80a3511d70e8 ("cfg80211: add debugfs HT40 allow map") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YutvOQeJm0UjLhwU@kili Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
index 76b845f68ac8..d80b06d66959 100644
--- a/net/wireless/debugfs.c
+++ b/net/wireless/debugfs.c
@@ -65,9 +65,10 @@ static ssize_t ht40allow_map_read(struct file *file,
{
struct wiphy *wiphy = file->private_data;
char *buf;
- unsigned int offset = 0, buf_size = PAGE_SIZE, i, r;
+ unsigned int offset = 0, buf_size = PAGE_SIZE, i;
enum nl80211_band band;
struct ieee80211_supported_band *sband;
+ ssize_t r;
buf = kzalloc(buf_size, GFP_KERNEL);
if (!buf)