Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3707772imu; Mon, 28 Jan 2019 09:23:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4op+jw1+NrXegR8+redlnQmJU7yvZ/4jGLxLvFPP9lOTMOnqPvo1ed05y69JqBW8KAZs6l X-Received: by 2002:a65:6148:: with SMTP id o8mr20551648pgv.451.1548696185034; Mon, 28 Jan 2019 09:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696185; cv=none; d=google.com; s=arc-20160816; b=HYuoevLejId8MPKetrEMbI34h/7FK1GmlLUhmlze90M77hvgoE+eTs6iVyvxIap1bu 6W5hLKe8HsX/Gu0a6VwkLWy1Iutn8zoLICt80dCPwrABIxMTZBiWUl1gGAdHJ+LWcFig 77b3XQb+OwhGAgdLbviT+gFk6uDK3APCbxdJckt6IURLY2koPKC/VaSmFp2rdTMXqYTi EICLajdyhmHfwjvSpFtI0xOrW43tAaarBSUyA1jAGSeHjo3psk1OJfQUi1z8YS7GsUVA rwNAG5IrC44nI0+ec6ReSiuo/tA6IiIcQ8ywUrUw8bOPhV3qlJVmyPEPwl3D/9+srNbx yWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UrrNvzS64qfpRMCJo5j+F5Un/NRS6kC6cpxKLpJB+QA=; b=c9WmArzA4cDfDKlkEozz46i/IE6RnSLAfaMKegvI+lmYSkteHGxVKrAscBsmga9RoO k4BbjjF+gQfNKWW3FdS5uXZB1mY5V9f1it2BCg45ZcPqyrrZYQJGqJvviEk8N8kxyK5/ zz0SgRuk5QH2EYWZplKgW0FSCbbX2Mg/wPSwYpjBPC1CtrtPiHimVMaJabendSwgcPPX Y2x9Hj3I/LIW2YDFTkec8OISwRcxpRv2nYcS4PgH09PH0HNMv2BHq80oes2m9g1emO3f vVbY+fNrx5MVTWl1yR9utaH2D+A35/4v1jIBhVkEGAtwQVIu0A5xM+3bbakBurmJwPCg Ypkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jXm24Cgv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si34273951pld.353.2019.01.28.09.22.49; Mon, 28 Jan 2019 09:23:05 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jXm24Cgv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731349AbfA1QDQ (ORCPT + 99 others); Mon, 28 Jan 2019 11:03:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:48536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727969AbfA1QDN (ORCPT ); Mon, 28 Jan 2019 11:03:13 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0411021852; Mon, 28 Jan 2019 16:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691393; bh=JYZ9wKN3GG7XpQUG9Se5rWp0h1ZFhe21NVzsX2cQnbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jXm24CgvQP9wwU/8xDd+RrPFGd/qCW8bZDmgpJxL1zvyMiAltm8JmAmIKQkJ3K8s6 trFTZZeWeL8nZ5jo4tZkNm8prDtNLymytZTDWqfbjnF2ag3/l2BBpWltdVJhtYM6cR Ty/wHrDXPzpfqjocj59MzLfS+U97ciuDLz4jvl4c= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: YueHaibing , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 078/258] net: aquantia: return 'err' if set MPI_DEINIT state fails Date: Mon, 28 Jan 2019 10:56:24 -0500 Message-Id: <20190128155924.51521-78-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing [ Upstream commit 4e3c7c00bba0636b97eb23d582c20b0f5d95ce20 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 c965e65d07db..9939ccaeb125 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 @@ -262,6 +262,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.19.1