Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1339904pxa; Sun, 2 Aug 2020 04:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmEYrn6kLmDMn6gMZCLUj2rqwM6crgH2Gahk9VfHYTXYrRX8DwB3YUwwFGcM0ftorCtYnh X-Received: by 2002:a17:906:6406:: with SMTP id d6mr11635460ejm.30.1596367188948; Sun, 02 Aug 2020 04:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596367188; cv=none; d=google.com; s=arc-20160816; b=vz0PhzNZJ/PIydPBk+L/88PnQWSyannZa1EJPgb48z3PBjtkluSZ0F293F4cWIbURm zqHYznIXreIvmcj5nqpJ1yrjpFcbFST6deSaxN9bnB64zduWD1q82KnrzjFj7Vd4hMrx f56RhsoTGu4WEsAvUa9xhzAIwB7uTY9emcWcz2zMNMQVcQwZnZOwRri2zx+LdKiCMzhQ PtTBCcb0NOTU9NCI4ER4SpdiOxW/h02skSAT5j2PwWlhvszie0WZ23KWRmI9ABRw63MK rzIP/AEb/Uws4t0dnIElh1v8b3k5hS6SYjJO3Jt4e4y9XqHoFzPSLDnHsOMgJrwpL/+i hudQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=3tR7FHcKbyKnZGtEHrnTQWgDcuckASN1tefHhJ5srso=; b=R/FK3C4QSP7btWbnwEBmStjneCHFYnfAHKOiUmP1mvyE3gsY8UQY+RCCeW7HF/kwTo cdLjib90f5Qy9Y+GL2edhzH5LPh0OD6reUoxJ9UaL28I3jT6F/ZML8sWu8CUWbb6COI1 2mSb9MNtobu5A0vkQu/4cIqnvc13b/Yn2L+pzqAg89g1zRmlvJreGLYCXTgm/VfMr5J+ iGIx792B9eoM56GIDlYErdw5zDoUf28zNKxuFeLyHho8y3iOVl7zp+E0CHfyujlKMHye dHR3Qty6rodK8sy7z5skyX0+nol9c6zESv54pNlHe/l7kwGTbkCJB6VP29iEoK4c1BkZ +Brw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z25si8269352ejr.598.2020.08.02.04.19.26; Sun, 02 Aug 2020 04:19:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728471AbgHBLQX (ORCPT + 99 others); Sun, 2 Aug 2020 07:16:23 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:59000 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727994AbgHBLPm (ORCPT ); Sun, 2 Aug 2020 07:15:42 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R621e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0U4T30Da_1596366937; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4T30Da_1596366937) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:38 +0800 From: Tianjia Zhang To: irusskikh@marvell.com, davem@davemloft.net, kuba@kernel.org, mstarovoitov@marvell.com, dbezrukov@marvell.com, ndanilov@marvell.com, tianjia.zhang@linux.alibaba.com, Pavel.Belous@aquantia.com, Alexander.Loktionov@aquantia.com, Dmitrii.Tarakanov@aquantia.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] net: ethernet: aquantia: Fix wrong return value Date: Sun, 2 Aug 2020 19:15:37 +0800 Message-Id: <20200802111537.5292-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 a312864969af..6640fd35b29b 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; -- 2.26.2