Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4626896pxj; Wed, 12 May 2021 09:32:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlxM6P+1sR9dLf6EGlUIyOJVyWvptDeS8ScjIuti14Kz5DblTrj7UTyXW/ellVlM7U4jxR X-Received: by 2002:a17:906:cc8b:: with SMTP id oq11mr38108314ejb.520.1620837126936; Wed, 12 May 2021 09:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837126; cv=none; d=google.com; s=arc-20160816; b=eElhpAab+frDIzR8r3gwOvnCwFqxYODrHPT90nLYj7ZtrFElHRlHbR86MSHtQwNr9N vQYfMaWC+u3+kKxTGgUEzocJ7coJGbnsBOT9JBf4hx5xmiadksRPjt5687T5ZlyCrrsm Vj/017ZMmoSoE89mu+B1NbJbHfHNAuZsYSoRDu88TCKhG5pAFKNToxQKwfKzH1vRaSI7 uQm9dpawyXf1peMPdwrGB9tKeepgafcUDgPZ7WFBgcJcy1NDxd+QH35Tn1dVwy7p3p0B +DQVS1mlT9VtWHDLvFd59zO00mAJnQl7yWHv/3G9Rz8T+YWwaxBc2oX42px99PfSF/xj Y5Qw== 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=I8Ws75ufZ05lTylYKyDuDmx2Bd9NeJONTbNebmnER0k=; b=KP0hBvIm2MxMsRHTXIGRTA5tnfFICyatzfohrxUkRAMNIHjvqm+0UHoKgkcuEYhzpV jnTa4UM32zbHrE42iCdy7EcN8v9EWx2tHfSme3YcNA96HxUVGk+n97F63AWrE1BbIpMk 3OXoH4+mYz8HfomqAoDrtP3yaj5jshp4DAjpR8OnurPPaq8lSZh/se/cgL7aEHcUv14b 6jmWJtFTreQD06Rtl76bBaA7+30AMYbPGoZIItlvk+j+OxlTRAbVrpbKVg99w79jv9x1 K9DyvyThSHQSGsCEzRyKo+A2B8bkAOVdmIMWCKSwEwtYUzj58Hgj2A+noEGa3ds+MjrI mFSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uSkIIj+e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si380101eji.560.2021.05.12.09.31.41; Wed, 12 May 2021 09:32:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uSkIIj+e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237245AbhELQ3s (ORCPT + 99 others); Wed, 12 May 2021 12:29:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:56350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234027AbhELPjL (ORCPT ); Wed, 12 May 2021 11:39:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E82F161C7D; Wed, 12 May 2021 15:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832839; bh=Rmj7uHe622XVKPhJAq6/ZVSLstBrivi1MwVjt/RTZHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSkIIj+ekreE+eXvcs1XyF/Np92KhVc7XXQrqm7hxtJSgQEru07ie/iMMB8UzJ6Hq JB0SNbp0Em5ASS/AkaQRLfpArKjyKQQGdfG4n7yGDB3eAWWCkaMtb8JrfNgnSCNqd5 EsN8ISp0XIgw3451BMD+MDR1aVApw6km7DwsSrX8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 410/530] rtw88: Fix an error code in rtw_debugfs_set_rsvd_page() Date: Wed, 12 May 2021 16:48:40 +0200 Message-Id: <20210512144833.238718581@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit c9eaee0c2ec6b1002044fb698cdfb5d9ef4ed28c ] The sscanf() function returns the number of matches (0 or 1 in this case). It doesn't return error codes. We should return -EINVAL if the string is invalid Fixes: c376c1fc87b7 ("rtw88: add h2c command in debugfs") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YE8nmatMDBDDWkjq@mwanda Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c index efbba9caef3b..8bb6cc8ca74e 100644 --- a/drivers/net/wireless/realtek/rtw88/debug.c +++ b/drivers/net/wireless/realtek/rtw88/debug.c @@ -270,7 +270,7 @@ static ssize_t rtw_debugfs_set_rsvd_page(struct file *filp, if (num != 2) { rtw_warn(rtwdev, "invalid arguments\n"); - return num; + return -EINVAL; } debugfs_priv->rsvd_page.page_offset = offset; -- 2.30.2