* [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
@ 2017-05-19 8:46 Kishon Vijay Abraham I
2017-07-04 10:22 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-05-19 8:46 UTC (permalink / raw)
To: linux-kernel; +Cc: nsekhar, kishon
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.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
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);
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
2017-05-19 8:46 [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe Kishon Vijay Abraham I
@ 2017-07-04 10:22 ` Kishon Vijay Abraham I
2017-07-05 8:08 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-07-04 10:22 UTC (permalink / raw)
To: linux-kernel, arnd@arndb.de, Tony Lindgren; +Cc: nsekhar
+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 <kishon@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> ---
> 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);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
2017-07-04 10:22 ` Kishon Vijay Abraham I
@ 2017-07-05 8:08 ` Tony Lindgren
2017-07-11 10:17 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2017-07-05 8:08 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-kernel, arnd@arndb.de, nsekhar
* Kishon Vijay Abraham I <kishon@ti.com> [170704 03:23]:
> +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?
Yes can you please resend? I don't seem to have it in my inbox.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
2017-07-05 8:08 ` Tony Lindgren
@ 2017-07-11 10:17 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-07-11 10:17 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-kernel, arnd@arndb.de, nsekhar
Tony,
On Wednesday 05 July 2017 01:38 PM, Tony Lindgren wrote:
> * Kishon Vijay Abraham I <kishon@ti.com> [170704 03:23]:
>> +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?
>
> Yes can you please resend? I don't seem to have it in my inbox.
re-sent now.
Thanks
Kishon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-11 10:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-19 8:46 [PATCH] bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe Kishon Vijay Abraham I
2017-07-04 10:22 ` Kishon Vijay Abraham I
2017-07-05 8:08 ` Tony Lindgren
2017-07-11 10:17 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox