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 C7223C6FA8B for ; Fri, 16 Sep 2022 10:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230435AbiIPKH4 (ORCPT ); Fri, 16 Sep 2022 06:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbiIPKHw (ORCPT ); Fri, 16 Sep 2022 06:07:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E602AB1AF; Fri, 16 Sep 2022 03:07:42 -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 03A6B628AF; Fri, 16 Sep 2022 10:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC165C433D6; Fri, 16 Sep 2022 10:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663322860; bh=Yy+QJ8tlNvHmBxspzZ1dLNGVkG6l9ASkDRXsHYTOjAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VFJihM+1ptqWXqxm8aYNaeiZeJJqUrEsk3X+gmQmN5UVQ3xDcuYXyVWzqxisOuaFY AoM1P04mCVqqQ8UXAqNPS87aiW69V6bXC7eCTva9RibijKAfKMct03JGXWVDyNO43R +Iff/J5E+Pd9VtjikKF4BjoU/OPXH9jwyLbbdyh4= 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 4.9 4/7] ieee802154: cc2520: add rc code in cc2520_tx() Date: Fri, 16 Sep 2022 12:07:47 +0200 Message-Id: <20220916100441.243133628@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100440.995894282@linuxfoundation.org> References: <20220916100440.995894282@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: stable@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 d50add705a79a..436cf2007138a 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c @@ -512,6 +512,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