Skip to content

Commit

Permalink
memory: renesas-rpc-if: Return error in case devm_ioremap_resource() …
Browse files Browse the repository at this point in the history
…fails

Make sure we return error in case devm_ioremap_resource() fails for dirmap
resource.

Fixes: ca7d8b9 ("memory: add Renesas RPC-IF driver")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20211025205631.21151-6-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
  • Loading branch information
Lad Prabhakar authored and Krzysztof Kozlowski committed Nov 16, 2021
1 parent 4b5a231 commit 818fdfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memory/renesas-rpc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(rpc->dirmap))
rpc->dirmap = NULL;
return PTR_ERR(rpc->dirmap);
rpc->size = resource_size(res);

rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
Expand Down

0 comments on commit 818fdfa

Please sign in to comment.