Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3412315pxf; Mon, 29 Mar 2021 01:15:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCb03RBMmAsS5xbW9OC0pAhLjtMufjGb86rcuTSfbXyB4K5QxWo4fQ4fgBepbJA4NpbiGu X-Received: by 2002:a17:906:1dd3:: with SMTP id v19mr27134909ejh.4.1617005745818; Mon, 29 Mar 2021 01:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617005745; cv=none; d=google.com; s=arc-20160816; b=ACXrCF7cuhzhlk6dnCrCkgxfO7/6nv+Dm1MVO4lV1+N0fN0iVz7dF/fY104fy7ESR1 o3wNF5DZf+4MdaRThiLy1HmUt+OEllC8WXDqCS9qFzd0VEb7InKhPLTpjfBFMDVlio+1 k0ff4G0C1dZXLcq/hyLIR0wZRwLsN7mo/PuMDLlv1ufIZQ8UbE591TQjm22SaSe71O68 JQYsP0nI3pedyoopH6cLyZtdge7VHzY8nTbX3hi4sCcPzMJvi1A3X3bIupTfWuss4UhI E6dW8WkVfMz4n7Cmx4AQhY05Tbg6FTEpoK82JrB7Ln/7zyLLPl1kZmwJC4RnyjFeyd0R a8dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IiA2Wa/4MHnWoXr0Obv+8Lif+qwp5Wwvy60hBakzAqU=; b=CcoopxhbvTBmA0SrR4Gt35cAmP63veg/dMOeikd/BEAcSbsSOOoyygOLH1bTl9OaD+ QoBRwnazB7HVN7LvcoznU7OJ4prz2Su5p+sM/e+PPRCY+2IEEwxEUhJ3AP2oEyG0kQI7 4TgpS19R56ViqkkGNGY7XheiyulZqM9hYM3NvshfgiVF8pG1zBu+fpUiYTK6cpHDVxGW UfTUvZEwWAamgup/M4NBaYz3I81mha0IdJggwkN9/V715WNqXwf5WMBpE6w5WblSxg9h bGn2BeqYq4qE0JhyUrofBbk6VF79+wZ1UbKtxPRi1DaFGeEDXX2jxX+5HGambvdBbuUl YJzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wl6OZryC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r22si11763951eds.172.2021.03.29.01.15.23; Mon, 29 Mar 2021 01:15:45 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wl6OZryC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232420AbhC2ILw (ORCPT + 99 others); Mon, 29 Mar 2021 04:11:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:49960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231725AbhC2IGl (ORCPT ); Mon, 29 Mar 2021 04:06:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46D9A619B4; Mon, 29 Mar 2021 08:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005200; bh=Sepos0qn7ogREQUQReaVRdvkH4LNy6TqoeWdQ4e0K/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wl6OZryCLGuYzSr1Pa7Kroo84rFlGgrQXADhjF0JRI2kQ2S26ljNDTRyy5Q3bYOBl 1D5/eMUB8KbJFR7xM6TpQ2o0bbeTXv6gIF4pT/NlHDkWDSPZ0SP2xZ9uVc0iQ1nAgE QcOAjqQXY0QUDDme66vU9bolbST7GXVxt7u9IScY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Sasha Neftin , Dvora Fuxbrumer , Tony Nguyen , Sasha Levin Subject: [PATCH 4.14 34/59] e1000e: Fix error handling in e1000_set_d0_lplu_state_82571 Date: Mon, 29 Mar 2021 09:58:14 +0200 Message-Id: <20210329075610.009394028@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075608.898173317@linuxfoundation.org> References: <20210329075608.898173317@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu [ Upstream commit b52912b8293f2c496f42583e65599aee606a0c18 ] There is one e1e_wphy() call in e1000_set_d0_lplu_state_82571 that we have caught its return value but lack further handling. Check and terminate the execution flow just like other e1e_wphy() in this function. Fixes: bc7f75fa9788 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)") Signed-off-by: Dinghao Liu Acked-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/e1000e/82571.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 6b03c8553e59..65deaf8f3004 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c @@ -917,6 +917,8 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active) } else { data &= ~IGP02E1000_PM_D0_LPLU; ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data); + if (ret_val) + return ret_val; /* LPLU and SmartSpeed are mutually exclusive. LPLU is used * during Dx states where the power conservation is most * important. During driver activity we should enable -- 2.30.1