[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeEmafhdju6Ekq1syqb7ir2Ntov7Ypbby8bFDfKPQ8+pw@mail.gmail.com>
Date: Fri, 18 Aug 2017 15:22:36 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc: "x86@...nel.org" <x86@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Zha Qipeng <qipeng.zha@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
"dvhart@...radead.org" <dvhart@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Shevchenko <andy@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Sathyanarayanan Kuppuswamy Natarajan <sathyaosid@...il.com>
Subject: Re: [RFC v1 1/6] platform/x86: intel_pmc_ipc: Fix error handling in ipc_pci_probe()
On Tue, Aug 1, 2017 at 9:13 PM,
<sathyanarayanan.kuppuswamy@...ux.intel.com> wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
>
> This patch adds proper error handling for failure cases in
> ipc_pci_probe() function.
>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> ---
> drivers/platform/x86/intel_pmc_ipc.c | 23 ++++++++++++++++++-----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
> index bb792a5..7b65237 100644
> --- a/drivers/platform/x86/intel_pmc_ipc.c
> +++ b/drivers/platform/x86/intel_pmc_ipc.c
> @@ -489,33 +489,46 @@ static int ipc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>
> ret = pci_enable_device(pdev);
> if (ret)
> - return ret;
> + goto release_device;
Instead of doing this way and ping-ponging code in the same series,
better to switch to managed PCI functions in the first place.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists