From nobody Thu Sep 4 03:23:01 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FFD0C6FA82 for ; Tue, 13 Sep 2022 15:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236452AbiIMPaY (ORCPT ); Tue, 13 Sep 2022 11:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236415AbiIMP21 (ORCPT ); Tue, 13 Sep 2022 11:28:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED9147DF7D; Tue, 13 Sep 2022 07:39:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 49B14614B7; Tue, 13 Sep 2022 14:30:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48D2FC433D6; Tue, 13 Sep 2022 14:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079401; bh=+JRUnhSsb3qZnjCJWE7V6Qy4eCV8rMWMOG6/1fnFw8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XyIgdVgdKCdGCqy10r83g3KtLn6NJP9VZzHYw6jv35tZWPb4sLuvkYr4xQidUt5eg mSSZ022arcuKlkSo2nqN3ElOkT3/HFDjyqlT6A5deJl4WTFWFgZ5vlvSG/9JJAHweI u1b3+hD4HyCdfxNZN/DZCLnsC47gaZGLz16ndcwQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 12/79] wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() Date: Tue, 13 Sep 2022 16:06:30 +0200 Message-Id: <20220913140349.443475434@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140348.835121645@linuxfoundation.org> References: <20220913140348.835121645@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Dan Carpenter [ 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 Link: https://lore.kernel.org/r/YutvOQeJm0UjLhwU@kili Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c index 30fc6eb352bcc..e6410487e25da 100644 --- a/net/wireless/debugfs.c +++ b/net/wireless/debugfs.c @@ -68,9 +68,10 @@ static ssize_t ht40allow_map_read(struct file *file, { struct wiphy *wiphy =3D file->private_data; char *buf; - unsigned int offset =3D 0, buf_size =3D PAGE_SIZE, i, r; + unsigned int offset =3D 0, buf_size =3D PAGE_SIZE, i; enum nl80211_band band; struct ieee80211_supported_band *sband; + ssize_t r; =20 buf =3D kzalloc(buf_size, GFP_KERNEL); if (!buf) --=20 2.35.1