Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3422129pxf; Mon, 29 Mar 2021 01:36:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8ftnRglJNjiQClefViF7K+6bfN62nwedbZ5gwnF97SRwFar9J22R21O3+wVzV/fHz/uQg X-Received: by 2002:a05:6402:1051:: with SMTP id e17mr27466080edu.42.1617006978434; Mon, 29 Mar 2021 01:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006978; cv=none; d=google.com; s=arc-20160816; b=rf1sBCTCKOd4AUCXpNOTSBdvBQoxA5Tw6LDg8ywDJRL83+P7VlIeoWjUyUkHsx50Sf +aEyPvSO18YXCX7LD2mJqR8D4XJk5SBRiEbdTLBfq/vBYL9hz44ilr05LBK1J86itxNH jOe6OIxLQM3Jq6oAHVlEnSKxMGipN3b/xB5xPtxablOuwu8R57RKmLVLRhmFOXtyT5r6 cJUx/OewtnjagfJ/Dj6j+YcXQS1GbPI6OWjS8wKCi+y8SX8bXAed4ATAEG18C7oOhtam jEo34eL7cZJRspVYgF33LibfUL3h29Vj6pkmKe+hoxd9uMouVT4ZJlzwN17Z2X5FgOQb SmAQ== 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=KYybBf43VL7sOeLZlkmSzYwzop/MYOHZUUfHlAJwtb0=; b=TnDBaLC0vG8mi4ECbROVhf5kS7WNR1P4jOLNycNkGkgYckPvgnuOn1AZeALvERKEwe Qg6HAf4VngOdF0w9MpGirK5UA45iv9apjcEmCgXoSkoNReRzxfcydQEJ8rd3lSaydE3C CDanZ1QVqfXXvEADT4vIH7iBKlQAQPdWZOWgh8zT/Bf8fGG64+rbW+hubeL6cgSP6C59 I4/GrAXqeyDmmb6/8iGeGQ0rE3GRTK7uA2iW1FRKmNOPj6fDmG+kjj6iK6crjq2c2fDZ p0kaJ1mlpbIXiuhwLbLORykdPXO2qspY+a1oo8exZrvRodCx53VLSAH17mqxV0ohs7Mr k0PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kJAWu7T0; 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 r25si12302539ejs.195.2021.03.29.01.35.44; Mon, 29 Mar 2021 01:36:18 -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=kJAWu7T0; 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 S233946AbhC2Ie1 (ORCPT + 99 others); Mon, 29 Mar 2021 04:34:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:36736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbhC2IVR (ORCPT ); Mon, 29 Mar 2021 04:21:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D091161601; Mon, 29 Mar 2021 08:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006076; bh=0lk667QrNTk1uGXBGMcmQArzTf7hHjurO3OmPT+KT2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kJAWu7T0jUF+RoSaC63mR3b1nFZ14iDwCcjryJfm9rPBRabVaPbFxatudgFvI/yqe WITN/re79aSmQXip8iQZ7KQGvqvd/GtY7VYpeXNvXm3lCXxiPuu+X+1HijZH2aGZjI e4lMeKGMwsGp/SymVsbEj7ac34bycf0p9e8OT76c= 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 5.10 110/221] e1000e: Fix error handling in e1000_set_d0_lplu_state_82571 Date: Mon, 29 Mar 2021 09:57:21 +0200 Message-Id: <20210329075632.886991812@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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 88faf05e23ba..0b1e890dd583 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c @@ -899,6 +899,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