Message ID | d196bb5849843993557a9b10f3bd28a752e5e8e0.1648562287.git.geert+renesas@glider.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path | expand |
On Tue, Mar 29, 2022 at 04:00:38PM +0200, 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> Good catch! Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
On Tue, Mar 29, 2022 at 3:09 PM Geert Uytterhoeven <geert+renesas@glider.be> 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> > --- > For the mtd tree. > > drivers/mtd/hyperbus/rpc-if.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Cheers, Prabhakar
On Tue, 29 Mar 2022 16:00:38 +0200, Geert Uytterhoeven wrote: > If rpcif_hw_init() fails, Runtime PM is left enabled. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [2/2] spi: rpc-if: Fix RPM imbalance in probe error path commit: 2f8cf5f642e80f8b6b0e660a9c86924a1f41cd80 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
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; }
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> --- For the mtd tree. drivers/mtd/hyperbus/rpc-if.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)