Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp878509pxj; Fri, 11 Jun 2021 14:07:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ2H3JWzOCn/EAUGEPzcG45Gr8hUBbCO/DZglYbzTafsEqtyv2D3szY5ClXp1WoWzWqzgf X-Received: by 2002:a17:907:10d8:: with SMTP id rv24mr5247497ejb.542.1623445668697; Fri, 11 Jun 2021 14:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623445668; cv=none; d=google.com; s=arc-20160816; b=ul1QeDH0Xnx+Fli+MWy33l2MiTbJ9t4xKxwzKcqaYewlJ3DykK+GienX4l50YdoaJg RMGc63i+OsfRn2xv4DayaElTqp/Fa9nvNPjEA+3L+25Xa7L4U1dOdnsEEKwmXxGkeRDV xAEDnykxSSGxBWaxG2C6bg6So/A7B51bThZ8kfxDMbSvmkt7gNbZG+/uSmJEajUZX0Yj 7fcZfzfpdvpL1SrNCTwUvazUU42v7DUFZ7g5a+b30HonXGWjOu1VaFJQVTFreNQM95JI Czme+O6zM1x3TEmvkuNlOMm5JLJUXlesuMdYjTwSrQOoYoQGcMkGygv3Fjo04mlXBmj2 t9Ig== 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 :message-id:date:subject:cc:to:from; bh=fZYidIEdUs+zI3ZHoQfPCRORHreNIN5n6Bobj+yLQl8=; b=WepxSXeuHJ87kX9ez2cq2q54t7qG5pY8JozYGoCld1J1HhxDas+YUwUaqKPwXrN8XU 75DdWe3mFBpKKzpRrAqo4NI5s5ElGTG487gT6SS3iS28z5shRGXb8c0G71UgaGVfJfcu sjf0g3W7z+MynMmrlzlKuv9tRwe4I1pOLAL2iMvvXpC4JSCvATfbIfpw/SL5NCHwdYDy zyD4wPEDylDirf4CGh0G8qnfIxxpM/1q4F/MoOse7D6dA2MH9ch/QqUevz5Dv2IGo80J RuiwbYItA/Ur1piEJLh58NatmyNqnQEGGsB2MCrAtCWFuynw9splMWF0A5qX7j0fclI9 5mTA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh4si6568707ejb.680.2021.06.11.14.07.23; Fri, 11 Jun 2021 14:07:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbhFKVF4 (ORCPT + 99 others); Fri, 11 Jun 2021 17:05:56 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:59153 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231200AbhFKVFz (ORCPT ); Fri, 11 Jun 2021 17:05:55 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d75 with ME id Fx3s2500921Fzsu03x3tKb; Fri, 11 Jun 2021 23:03:53 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 11 Jun 2021 23:03:53 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: mani@kernel.org, hemantk@codeaurora.org, loic.poulain@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] bus: mhi: pci-generic: Add missing 'pci_disable_pcie_error_reporting()' calls Date: Fri, 11 Jun 2021 23:03:50 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call Add the missing call in the error handling path of the probe and in the remove function. Fixes: b012ee6bfe2a ("mhi: pci_generic: Add PCI error handlers") Signed-off-by: Christophe JAILLET --- drivers/bus/mhi/pci_generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c index 7c810f02a2ef..d84b74396c6a 100644 --- a/drivers/bus/mhi/pci_generic.c +++ b/drivers/bus/mhi/pci_generic.c @@ -665,7 +665,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config); if (err) - return err; + goto err_disable_reporting; /* MHI bus does not power up the controller by default */ err = mhi_prepare_for_power_up(mhi_cntrl); @@ -699,6 +699,8 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) mhi_unprepare_after_power_down(mhi_cntrl); err_unregister: mhi_unregister_controller(mhi_cntrl); +err_disable_reporting: + pci_disable_pcie_error_reporting(pdev); return err; } @@ -721,6 +723,7 @@ static void mhi_pci_remove(struct pci_dev *pdev) pm_runtime_get_noresume(&pdev->dev); mhi_unregister_controller(mhi_cntrl); + pci_disable_pcie_error_reporting(pdev); } static void mhi_pci_shutdown(struct pci_dev *pdev) -- 2.30.2