Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4479147rwb; Tue, 6 Sep 2022 08:05:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR7eHmxr2kK+Ow1QO7SKRPKcbjYa4hryEMhLfoSRV6dV5Wa3LZpUhRCH7jI2oSBnLi9ke8Hw X-Received: by 2002:a05:6a00:1947:b0:536:6730:7d33 with SMTP id s7-20020a056a00194700b0053667307d33mr55768076pfk.10.1662476757523; Tue, 06 Sep 2022 08:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476757; cv=none; d=google.com; s=arc-20160816; b=e82SPP39UcBe4PX3QHOlnToGrQXJoBxZW/9Tn/0lOaUrrOM+5qqdUAiCz1cIhUf4ac c4EquGUpje9Hj5yfPeyboLq/G83ReBBzfX4C2qrYICTW65pn9L83tWV/IS6PdSuOO/uN GuGXC3bmFg4sTu22p6sXOzOK6a0Oa72uhW/XhgLgpEcWXrCGXodGRQxpRSo9zAuFnr9D JWc/sjEu9pw9rK2NL+4oX55vyi9JKqtyl6/H0KTsqQLB/Q/WMUkCrIDpL/MrFoiK9AWd LDiOM0lkfTPEuDTjQ3V2hYCnQyAn1c26M/VsGJEFS1CaREuDIH6c/PROeh5HqWsP2CG4 UuVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p0Dt1QhX45rNSa/5/TlgvPn3hmoI34buT0mk0VtwmHQ=; b=fuxmslm02AFqeRKKLZ2OnU1j7PSdSHb0jHwympzkg2E7lK5R/zKozQSXa+jj4OX3Ns YyZm4PsiPFx7e6fsd++PYeX9+hgy020vJaqjfFSiduC71AXFdkckFK4fI4wwJWdlvpca ftRhF75vx5sClBtiAQi/XGVGfz6EVZed1d/a9rXWWOU3K1RFaU72jbkCPqB741dLmkoJ 6qjN/oYrpqimChDVzMZdatVr9olYlVvywkDZf9x8v9Em+4+ajJroCjAmjQZhuK3f4zxK /KlyYSSfEzaAv3neJKEFOnf4091ut87az+CeIlXOBHcbz7tskUcn3fwsCYSwXG2fUv4E xk2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fvPPERfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj9-20020a17090b4d8900b001fdc17f948esi14021748pjb.189.2022.09.06.08.05.45; Tue, 06 Sep 2022 08:05:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fvPPERfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239971AbiIFNcU (ORCPT + 99 others); Tue, 6 Sep 2022 09:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239866AbiIFNcN (ORCPT ); Tue, 6 Sep 2022 09:32:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174F2760E1; Tue, 6 Sep 2022 06:32:09 -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 9F13960F89; Tue, 6 Sep 2022 13:32:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2CBFC433C1; Tue, 6 Sep 2022 13:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471128; bh=ZKmUbdDwejXSkwgft8nsKPNTXVa5RDRarrObMQNeIME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fvPPERfY8JqCRC99hOkxW3AonOcPkFPMOn/3cPvxX38v5HdhncuBp7Ke7ba5HkiyJ lYuVxqKgcRWbTyGUrdxW24Sclu/V5KJ0tRzAKWkgx3mcJybpC5uDy6ZKdmXnUvvLoX 3C97+mQd2q1zx66zpQjKxghjS4N6YxWv4gs77Qyw= 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 5.10 11/80] wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() Date: Tue, 6 Sep 2022 15:30:08 +0200 Message-Id: <20220906132817.397814900@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132816.936069583@linuxfoundation.org> References: <20220906132816.936069583@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 76b845f68ac89..d80b06d669593 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) -- 2.35.1