From patchwork Mon Aug 17 15:15:09 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: 266020 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 E6175C433E1 for ; Mon, 17 Aug 2020 19:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD708204EC for ; Mon, 17 Aug 2020 19:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597692074; bh=KVA7jIGmUpUlfr8yJQEV2oOgWlA9Co+YOsKvENc/6E0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MuOSaAz2Os9GYDaeBxNf3STsS3DbfS8B0I862rd7VjEqcCC7+4Mr3hEmOpmjBAlQE ty+jvqmXXnE5iIAaJunvmFSlWTqYykXK/8awgmPUUMFqnM2aG+MG0FjfpBcUwqgH9D 4UPVZZpXwwOoVp75cFK1HdQvuY3RscMy8JKKO9p4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388893AbgHQTVO (ORCPT ); Mon, 17 Aug 2020 15:21:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730501AbgHQPgi (ORCPT ); Mon, 17 Aug 2020 11:36:38 -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 ABEDB20709; Mon, 17 Aug 2020 15:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678589; bh=KVA7jIGmUpUlfr8yJQEV2oOgWlA9Co+YOsKvENc/6E0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bk3SJilwnN+OQwd7pltbpcd68rYccOITgkPIvEehbdQCHXFZ5qFMAWvVg+k6z9k3e 24dYIzRK6IJ4b2tJKsk8t7lI7rXgf9Y1SLEh0EY7QEnVH8j05cm7POUlWwDMXCwfEX NAGI5uIKA/rhCtnJ3xOyynhVLLYQQTkneyGXrqIs= 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 5.8 356/464] net: ethernet: aquantia: Fix wrong return value Date: Mon, 17 Aug 2020 17:15:09 +0200 Message-Id: <20200817143850.818079496@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@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 a312864969afe..6640fd35b29b2 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 @@ -782,7 +782,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;