Release the node reference by calling of_node_put(flash) in the probe.
Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek pavel@denx.de Signed-off-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com Cc: stable@vger.kernel.org Reviewed-by: Sergei Shtylyov sergei.shtylyov@gmail.com --- drivers/memory/renesas-rpc-if.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index a8d0ba368625..da0fdb4c7595 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -561,9 +561,11 @@ static int rpcif_probe(struct platform_device *pdev) } else if (of_device_is_compatible(flash, "cfi-flash")) { name = "rpc-if-hyperflash"; } else { + of_node_put(flash); dev_warn(&pdev->dev, "unknown flash type\n"); return -ENODEV; } + of_node_put(flash);
vdev = platform_device_alloc(name, pdev->id); if (!vdev)
On Thu, Nov 26, 2020 at 8:12 PM Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com wrote:
Release the node reference by calling of_node_put(flash) in the probe.
Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek pavel@denx.de Signed-off-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com Cc: stable@vger.kernel.org Reviewed-by: Sergei Shtylyov sergei.shtylyov@gmail.com
Reviewed-by: Geert Uytterhoeven geert+renesas@glider.be
Gr{oetje,eeting}s,
Geert
On Thu 2020-11-26 19:11:44, Lad Prabhakar wrote:
Release the node reference by calling of_node_put(flash) in the probe.
Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek pavel@denx.de Signed-off-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com Cc: stable@vger.kernel.org Reviewed-by: Sergei Shtylyov sergei.shtylyov@gmail.com
Reviewed-by: Pavel Machek (CIP)< pavel@denx.de
On Fri, Nov 27, 2020 at 11:41:14PM +0100, Pavel Machek wrote:
On Thu 2020-11-26 19:11:44, Lad Prabhakar wrote:
Release the node reference by calling of_node_put(flash) in the probe.
Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek pavel@denx.de Signed-off-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com Cc: stable@vger.kernel.org Reviewed-by: Sergei Shtylyov sergei.shtylyov@gmail.com
Reviewed-by: Pavel Machek (CIP)< pavel@denx.de
This breaks b4. Corrected and applied.
Best regards, Krzysztof
linux-stable-mirror@lists.linaro.org