* [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path
@ 2022-06-17 9:26 Geert Uytterhoeven
2022-06-17 12:22 ` Sergey Shtylyov
2022-06-24 18:48 ` miquel.raynal
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2022-06-17 9:26 UTC (permalink / raw)
To: Vignesh Raghavendra, Miquel Raynal, Richard Weinberger, Sergey Shtylyov
Cc: Wolfram Sang, Lad Prabhakar, Biju Das, Krzysztof Kozlowski,
linux-renesas-soc, linux-mtd, linux-kernel, Geert Uytterhoeven
If rpcif_hw_init() fails, Runtime PM is left enabled.
Fixes: b04cc0d912eb80d3 ("memory: renesas-rpc-if: Add support for RZ/G2L")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v2:
- Add Reviewed-by.
---
drivers/mtd/hyperbus/rpc-if.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c
index 6e08ec1d4f098c80..b70d259e48a7c728 100644
--- a/drivers/mtd/hyperbus/rpc-if.c
+++ b/drivers/mtd/hyperbus/rpc-if.c
@@ -134,7 +134,7 @@ static int rpcif_hb_probe(struct platform_device *pdev)
error = rpcif_hw_init(&hyperbus->rpc, true);
if (error)
- return error;
+ goto out_disable_rpm;
hyperbus->hbdev.map.size = hyperbus->rpc.size;
hyperbus->hbdev.map.virt = hyperbus->rpc.dirmap;
@@ -145,8 +145,12 @@ static int rpcif_hb_probe(struct platform_device *pdev)
hyperbus->hbdev.np = of_get_next_child(pdev->dev.parent->of_node, NULL);
error = hyperbus_register_device(&hyperbus->hbdev);
if (error)
- rpcif_disable_rpm(&hyperbus->rpc);
+ goto out_disable_rpm;
+
+ return 0;
+out_disable_rpm:
+ rpcif_disable_rpm(&hyperbus->rpc);
return error;
}
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path
2022-06-17 9:26 [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path Geert Uytterhoeven
@ 2022-06-17 12:22 ` Sergey Shtylyov
2022-06-24 18:48 ` miquel.raynal
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2022-06-17 12:22 UTC (permalink / raw)
To: Geert Uytterhoeven, Vignesh Raghavendra, Miquel Raynal,
Richard Weinberger
Cc: Wolfram Sang, Lad Prabhakar, Biju Das, Krzysztof Kozlowski,
linux-renesas-soc, linux-mtd, linux-kernel
Hello!
On 6/17/22 12:26 PM, Geert Uytterhoeven wrote:
> If rpcif_hw_init() fails, Runtime PM is left enabled.
>
> Fixes: b04cc0d912eb80d3 ("memory: renesas-rpc-if: Add support for RZ/G2L")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path
2022-06-17 9:26 [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path Geert Uytterhoeven
2022-06-17 12:22 ` Sergey Shtylyov
@ 2022-06-24 18:48 ` miquel.raynal
1 sibling, 0 replies; 3+ messages in thread
From: miquel.raynal @ 2022-06-24 18:48 UTC (permalink / raw)
To: Geert Uytterhoeven, Vignesh Raghavendra, Miquel Raynal,
Richard Weinberger, Sergey Shtylyov
Cc: Wolfram Sang, Lad Prabhakar, Biju Das, Krzysztof Kozlowski,
linux-renesas-soc, linux-mtd, linux-kernel
From: Miquel Raynal <miquel.raynal@bootlin.com>
On Fri, 2022-06-17 at 09:26:51 UTC, Geert Uytterhoeven wrote:
> If rpcif_hw_init() fails, Runtime PM is left enabled.
>
> Fixes: b04cc0d912eb80d3 ("memory: renesas-rpc-if: Add support for RZ/G2L")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-24 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 9:26 [PATCH v2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path Geert Uytterhoeven
2022-06-17 12:22 ` Sergey Shtylyov
2022-06-24 18:48 ` miquel.raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).