Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3308609imu; Sat, 24 Nov 2018 02:21:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4pBVI0RtiRtcj/BLCGLU4K5i4u2yarjR/cJnEZUeXqAeEOmTs9cNr7Z1hctPp4UHRCxHt X-Received: by 2002:a65:5a4c:: with SMTP id z12mr17542091pgs.188.1543054900938; Sat, 24 Nov 2018 02:21:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543054900; cv=none; d=google.com; s=arc-20160816; b=KOcpG+3s5OOnXxB85vr6oDZISSqdHE2+bcDK0n+BekgtUaBy0Zy0SXqbWkM5BL2FEP Q896eOGP4DLtK8ZDhn9RbjoMzSv2gT4BxHhGuDWchBHwMbT1df6lF2PnfNdTgSqJrgtq cezwTrvxgzJhxb/riUequTSHRuc3jrHPeHTPexVcTBAVLP3jO64sJIm/rTKK9rvR5jCQ Q+H9nj+TSfz/swYnhKvgBGMD2S6ticVccd/RCmlOq96rcpZD7tCTd9Dcee0KDNzPilQR 2NDcG4EbFeq4SijDUbHIx6jPH4hvc4/Ju4LifeZFHasfv9qyQAH2hEeu9wEXfCXI74vU BB4A== 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=z4jhTifVEjooqap1X9mY4kUqcmOK9tNJat6EwX7/soo=; b=NUcgQ3AXSWDIlR0BzNWZI/rHk8Jy6YWt9Q9WMRHl63j9RepgJUG4YXd0L4MYPPAHL3 vCnYH19Ctqfi4T16ZfNet0lJcRG/PSMUKuJidB7jz94tLMkD01OCr3MCwHrQ+zwTxSOP dlRiG6xQ60HBvTzHrvqXYdaRxoHv0/16brwyxpVu3SxJNgwjMU2MpAiU+1phynnhfGG+ 5LGvB4OioLqygW24x+ljrdrrJ/xVlfAUythIDHXkBtyThZkYhfCaD1tKFw1QfR/N6hIj fQh4RkLbaM9RWPJaEmHsMKvPc7uWdC2/aRF3P6xa1aobUmBxxUoMGtwAiWDWYGFcBgQn uO3A== 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 1-v6si33883362plx.278.2018.11.24.02.20.52; Sat, 24 Nov 2018 02:21:40 -0800 (PST) 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 S1726105AbeKXVHc (ORCPT + 99 others); Sat, 24 Nov 2018 16:07:32 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:43893 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725940AbeKXVHc (ORCPT ); Sat, 24 Nov 2018 16:07:32 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7318636812038; Sat, 24 Nov 2018 18:19:18 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Sat, 24 Nov 2018 18:19:14 +0800 From: YueHaibing To: , , , CC: , , YueHaibing Subject: [PATCH net-next] net: aquantia: return 'err' if set MPI_DEINIT state fails Date: Sat, 24 Nov 2018 18:16:41 +0800 Message-ID: <20181124101641.7072-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:260:7: warning: variable 'err' set but not used [-Wunused-but-set-variable] 'err' should be returned while set MPI_DEINIT state fails in hw_atl_utils_soft_reset. Fixes: cce96d1883da ("net: aquantia: Regression on reset with 1.x firmware") Signed-off-by: YueHaibing --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c index 1af6606..9b74a31 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c @@ -263,6 +263,8 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self) AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) & HW_ATL_MPI_STATE_MSK) == MPI_DEINIT, 10, 1000U); + if (err) + return err; } if (self->rbl_enabled) -- 2.7.0