From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752364AbdGDKWp (ORCPT ); Tue, 4 Jul 2017 06:22:45 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:11278 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbdGDKWo (ORCPT ); Tue, 4 Jul 2017 06:22:44 -0400 Subject: Re: [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe To: , "arnd@arndb.de" , Tony Lindgren References: <20170519084631.361-1-kishon@ti.com> CC: From: Kishon Vijay Abraham I Message-ID: Date: Tue, 4 Jul 2017 15:52:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170519084631.361-1-kishon@ti.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Tony, Arnd, Hi, On Friday 19 May 2017 02:16 PM, Kishon Vijay Abraham I wrote: > The error handling code in omap_ocp2scp_probe fails to invoke > pm_runtime_disable and fails to initialize return value in > certain cases. Fix it here. Can this patch be picked into arm-soc tree? Thanks Kishon > > Signed-off-by: Kishon Vijay Abraham I > Signed-off-by: Sekhar Nori > --- > drivers/bus/omap-ocp2scp.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c > index bf500e0e7362..77791f3dcfc6 100644 > --- a/drivers/bus/omap-ocp2scp.c > +++ b/drivers/bus/omap-ocp2scp.c > @@ -70,8 +70,10 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) > if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) { > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > regs = devm_ioremap_resource(&pdev->dev, res); > - if (IS_ERR(regs)) > - goto err0; > + if (IS_ERR(regs)) { > + ret = PTR_ERR(regs); > + goto err1; > + } > > pm_runtime_get_sync(&pdev->dev); > reg = readl_relaxed(regs + OCP2SCP_TIMING); > @@ -83,6 +85,9 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) > > return 0; > > +err1: > + pm_runtime_disable(&pdev->dev); > + > err0: > device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); > >