From mboxrd@z Thu Jan 1 00:00:00 1970 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 70FACECAAD8 for ; Fri, 16 Sep 2022 10:23:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231949AbiIPKW6 (ORCPT ); Fri, 16 Sep 2022 06:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbiIPKVw (ORCPT ); Fri, 16 Sep 2022 06:21:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C76CDADCC1; Fri, 16 Sep 2022 03:13:53 -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 515ABB82520; Fri, 16 Sep 2022 10:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DE86C433D6; Fri, 16 Sep 2022 10:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663323175; bh=LiI4v9vBPc7mLT6eREo4zXLAyk3E8pYsOLWHLK96i/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nyS1DDqpovG6NLBH2f3fhIQ3pMHFpAoVn3Mf697/AkaiwAYU3s3VcIjybCXKzSQYx X5DyNY5fqLXnqYTaadBkFNtDUH0YdA2IPl4OZTl4pp9CATMQvHPatAvafZiy+TLtjk Ig+xHaJD+xHcwLR+l21VFG3AuSAgOoWjeZYvbDIQ= 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.15 22/35] ieee802154: cc2520: add rc code in cc2520_tx() Date: Fri, 16 Sep 2022 12:08:45 +0200 Message-Id: <20220916100447.875710379@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100446.916515275@linuxfoundation.org> References: <20220916100446.916515275@linuxfoundation.org> User-Agent: quilt/0.67 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: 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/cc2520.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; if (status & CC2520_STATUS_TX_UNDERFLOW) { + rc = -EINVAL; dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n"); goto err_tx; } -- 2.35.1