Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2826842rwe; Mon, 29 Aug 2022 00:22:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Xj68VaOtDWP9fFg5QjeAAoLKNLIQsdQlPehs3SMnoiI4+0rs2+qg+vMBS5Q9TD0F1LZnk X-Received: by 2002:a05:6a00:230d:b0:52b:1819:3a0 with SMTP id h13-20020a056a00230d00b0052b181903a0mr15289648pfh.53.1661757760272; Mon, 29 Aug 2022 00:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661757760; cv=none; d=google.com; s=arc-20160816; b=H0czBKHyCitzHmQxNUwQGZ/jeeNgBjUsP7aJmaw5JxtuVEbsiw7zPLN5sAKKq/a8v3 yr3XvVVuNYn8izqDkxjozkAbYk5jl/Ngq6ckQWJEu29N8u9YmdwCmiPpw8qtAVNl8GW3 CYqM91KjP/nZ52TYx3ALqAo08CVm/beadi+kc5QxBsRAf7AMFPw/0ngxmrVxn7+2IV5/ NXcUp7u72TplZk+ijo6Y2vu8aLWT6IsnQxbsc7+rzE0OzMtXPUv30nqOIJYZypeviLVw PSzzib9oFGZdL1pHQVHvfcgMaeJ7GFDG8hGvUWCYsacvZqk9BkKcqg/hYAC/URxxMJ3V KvMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=v3/RyuPjTSQ1og41M9rmeVsm6gj9OWTsUA1teZaoEhY=; b=m4Ae+0Y5/KObhwzt4vuflYGT64yBoZaYiScWPALS7P7CDyqrE1qM6C9OafVgQFAq5l zyVnP0Kr7TURNCbHNdanpXsly08r55kxJHagyyuIRJWi7BaRGjcBAtERwjfrZ1Pk3W+O ZfRvF8gfPKnEMRfbUwtKDFBmjE7NqwpLqtkTNpSFpgEykrcPW6gRTZmp4/273rs+Fh9c TctaN85zSP6KFcuoMPSX2GresGDGxDZ0z6JWUbfZ82rY+YrUrQE+bV7Hw61Eyo9GsUmn rZHGgd/LBtblonWOMWe/Pxc3Kn2dFogdZrLV8fOQ8m+Yo5JAeU2/imntHNTtV8TPb3Cx p0RQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a17090a450a00b001f50245eefbsi8462147pjg.63.2022.08.29.00.22.29; Mon, 29 Aug 2022 00:22:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbiH2HOD (ORCPT + 99 others); Mon, 29 Aug 2022 03:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbiH2HOB (ORCPT ); Mon, 29 Aug 2022 03:14:01 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EF3E4DB07; Mon, 29 Aug 2022 00:13:59 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 999611E80D59; Mon, 29 Aug 2022 15:09:17 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O3EjoV5JMZno; Mon, 29 Aug 2022 15:09:15 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: liqiong@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 2BE0C1E80D2C; Mon, 29 Aug 2022 15:09:14 +0800 (CST) From: Li Qiong To: Varka Bhadram , Alexander Aring , Stefan Schmidt , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yu Zhe , Li Qiong Subject: [PATCH] ieee802154: cc2520: add rc code in cc2520_tx() Date: Mon, 29 Aug 2022 15:12:59 +0800 Message-Id: <20220829071259.18330-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 --- 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 1e1f40f628a0..c69b87d3837d 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.11.0