]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
memory: renesas-rpc-if: fix platform-device leak in error path
authorJohan Hovold <johan@kernel.org>
Thu, 3 Mar 2022 18:06:32 +0000 (19:06 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:01:00 +0000 (12:01 +0200)
commit3e789bfc2daf3481ffa6df5646bcc4602a91d1be
tree4a3a679b0b99262d81219193ef30e70b9fd1a5fe
parentcae8fbb1686fd14ea9cb0862d9dafedd0bb0c0a3
memory: renesas-rpc-if: fix platform-device leak in error path

BugLink: https://bugs.launchpad.net/bugs/1969857
commit b452dbf24d7d9a990d70118462925f6ee287d135 upstream.

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

Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
Cc: stable@vger.kernel.org # 5.8
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220303180632.3194-1-johan@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/memory/renesas-rpc-if.c