From nobody Tue Dec 16 11:06:26 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 A8FC7ECAAD8 for ; Fri, 16 Sep 2022 10:14:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbiIPKOY (ORCPT ); Fri, 16 Sep 2022 06:14:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbiIPKNk (ORCPT ); Fri, 16 Sep 2022 06:13:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8385DAB40B; Fri, 16 Sep 2022 03:10:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id A7987B82519; Fri, 16 Sep 2022 10:10:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24BFC433D7; Fri, 16 Sep 2022 10:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663323016; bh=LiI4v9vBPc7mLT6eREo4zXLAyk3E8pYsOLWHLK96i/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1Fs8x9ujBc5lpIq2tBlxWhBChAWGSsN409pZ23pzbKpFqkcPgBndNl88wG0icvtW PX9JIDFABh1+7I2SgpkW44loPUiFaseNzmyh8LkDD9xQ/yxeQvGm9Bz5idFg4r2Rvi Z/PRPSpgSIaJf1hsyrnrrqe0K0RLwl8D2K1IBEWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Qiong , Stefan Schmidt , Sasha Levin Subject: [PATCH 5.10 12/24] ieee802154: cc2520: add rc code in cc2520_tx() Date: Fri, 16 Sep 2022 12:08:37 +0200 Message-Id: <20220916100445.902773451@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100445.354452396@linuxfoundation.org> References: <20220916100445.354452396@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: Li Qiong [ Upstream commit ffd7bdddaab193c38416fd5dd416d065517d266e ] The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW". Assign rc code with '-EINVAL' at this error path to fix it. Signed-off-by: Li Qiong Link: https://lore.kernel.org/r/20220829071259.18330-1-liqiong@nfschina.com Signed-off-by: Stefan Schmidt Signed-off-by: Sasha Levin --- drivers/net/ieee802154/cc2520.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc252= 0.c index 89c046b204e0c..4517517215f2b 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c @@ -504,6 +504,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb) goto err_tx; =20 if (status & CC2520_STATUS_TX_UNDERFLOW) { + rc =3D -EINVAL; dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n"); goto err_tx; } --=20 2.35.1