Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1728868ybg; Sat, 19 Oct 2019 01:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyHjT/96n44U2XqsWcXC0Dn9e0G/zeCzAw1ludJgD+H2mte4A00iIkzWoLL94Ba33DDz8A X-Received: by 2002:a50:ce16:: with SMTP id y22mr13889067edi.293.1571472819930; Sat, 19 Oct 2019 01:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472819; cv=none; d=google.com; s=arc-20160816; b=jFAk6lQw0z7wb9hvbRzbgwOgYh2fo7j0BX3nR7EThAE6KxVstjsn2RH3kzXWk81G/m VeiXgpJu8mr8jQijFNOMZhv9rdOYwkRqaZCjO3T8D6WljlzUCNlZdLxSP9lCMjpR+h9M QTCGnF00EqjgCyR2A5rvZUyrzHGADoy0cysaV1c+i9xFkDNBTN+k1Q4Yuhz53EvdOSFa +i3uDxPdW/XYdPItxOYhUWsnZn9YlfQ7kSsJSSwQvI3KLH0/BURpjaixEpAgF1xYrQIs abSPFtgLiTR4/FwaxOkLQI2LsENTGXR5SF8AVncMjvRxQ/qyibqzJFvmXAdhyeY5gUIa ln3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=4vX6ucO4m5UQRil8vK2hGmu+cHiNdiEjfhd/k6QgUpA=; b=HXvVvQzTu88pHZU7X+lb/Pg8eUCxWo9dixpOOCv3kVTR19B+dpjA8qwOXAi8rDdMUw sRYVuSxdLH46xOGHfDBR+uktYTDX26lU8T3HLiENTYcHnzWLwoErcgKHtJv0ZgHJiTaS xxpLJeeyDDM5L2Qx6VJLiyclBuohVc3TxAIPA+xI1d/MVHFWKY3XkrXtyy7WD4sBdatM 8c/9wCJzjllzEfxUTWYHibGKEMNVxgd1e7ML8xF79HK9MCBFQ5ltaEUuk1rzfNuzBFkF HJSrBPdiABtNrMXMpIZbCNV0MYQvPny6GtcslXPQeOxdToKXT8QjSZEC6rYCXYSQYkM2 P0cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gu8si5006592ejb.107.2019.10.19.01.13.17; Sat, 19 Oct 2019 01:13:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633423AbfJRKN5 (ORCPT + 99 others); Fri, 18 Oct 2019 06:13:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4688 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2633402AbfJRKN4 (ORCPT ); Fri, 18 Oct 2019 06:13:56 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EE449446BAD95BC5B566; Fri, 18 Oct 2019 18:13:53 +0800 (CST) Received: from RH5885H-V3.huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 18 Oct 2019 18:13:46 +0800 From: Chen Wandun To: , , , CC: Subject: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list Date: Fri, 18 Oct 2019 18:20:37 +0800 Message-ID: <1571394037-19978-1-git-send-email-chenwandun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chenwandun add an error handling in aq_nic_set_multicast_list, it may not work when hw_multicast_list_set error; and at the same time it will remove gcc Wunused-but-set-variable warning. Signed-off-by: Chenwandun --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 2a18439..137c1de 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c @@ -664,6 +664,8 @@ int aq_nic_set_multicast_list(struct aq_nic_s *self, struct net_device *ndev) err = hw_ops->hw_multicast_list_set(self->aq_hw, self->mc_list.ar, self->mc_list.count); + if (err < 0) + return err; } return aq_nic_set_packet_filter(self, packet_filter); } -- 2.7.4