From patchwork Thu Aug 20 09:21:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 265609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6983C433DF for ; Thu, 20 Aug 2020 10:59:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCFA020724 for ; Thu, 20 Aug 2020 10:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597921175; bh=v78/EWJFzwcB65otAI9lJzqaFJH1bGjsm37KUaL8fJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ibBPaQ0f5nnyytMfuoZslg3kDAX22TAq3Hy57is9IP3woLGYFZb4ghvp5mVq74MNk uW1axMIJ/6M/IMTcfIyj+6mI+Vl2V2mj4ZbYhCTE+W1tjrHxcnwhj/zurw6EAzHWpU HUuU9TihbXMjjyCP1+6+WtuGBwApkb+i9xEQ7px0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731209AbgHTK70 (ORCPT ); Thu, 20 Aug 2020 06:59:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:57646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731126AbgHTKNZ (ORCPT ); Thu, 20 Aug 2020 06:13:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 202FA2067C; Thu, 20 Aug 2020 10:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597918404; bh=v78/EWJFzwcB65otAI9lJzqaFJH1bGjsm37KUaL8fJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F6QpviHoEew26+ZLgn8iRL+H9Stv+hj5l3kdTuJQaBkiN8gu1TAp18cHx73rOH5Mj TLliS0qjcuXw/kebvOtY1rAuc0SpinwJcywOW94/UFO6ZXGsDdyrMLbPSt31RZhtQN fptdlzUbvoXJdKdvz9QpRkNwUypPz6PFi94ULucE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David VomLehn , Tianjia Zhang , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 127/228] net: ethernet: aquantia: Fix wrong return value Date: Thu, 20 Aug 2020 11:21:42 +0200 Message-Id: <20200820091613.938924556@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091607.532711107@linuxfoundation.org> References: <20200820091607.532711107@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Tianjia Zhang [ Upstream commit 0470a48880f8bc42ce26962b79c7b802c5a695ec ] In function hw_atl_a0_hw_multicast_list_set(), when an invalid request is encountered, a negative error code should be returned. Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions") Cc: David VomLehn Signed-off-by: Tianjia Zhang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c index b83ee74d28391..77e5c69268146 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c @@ -746,7 +746,7 @@ static int hw_atl_a0_hw_multicast_list_set(struct aq_hw_s *self, int err = 0; if (count > (HW_ATL_A0_MAC_MAX - HW_ATL_A0_MAC_MIN)) { - err = EBADRQC; + err = -EBADRQC; goto err_exit; } for (self->aq_nic_cfg->mc_list_count = 0U;