Commit 27c1f5f2 authored by Johan Hovold's avatar Johan Hovold Committed by Zheng Zengkai
Browse files

memory: renesas-rpc-if: fix platform-device leak in error path

stable inclusion
from stable-v5.10.112
commit c089ffc846c85f200db34ad208338f4f81a6d82d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5HL0X

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c089ffc846c85f200db34ad208338f4f81a6d82d



--------------------------------

commit b452dbf2 upstream.

Make sure to free the flash platform device in the event that
registration fails during probe.

Fixes: ca7d8b98 ("memory: add Renesas RPC-IF driver")
Cc: stable@vger.kernel.org      # 5.8
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220303180632.3194-1-johan@kernel.org


Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 85fc72e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment