]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rpmsg: core: Clean up resources on announce_create failure.
authorArnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Mon, 6 Dec 2021 19:07:58 +0000 (20:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:19:49 +0000 (09:19 +0100)
commitb728b5295d1b66d863d35a0b8a2ee7da31964764
tree232b35c8f2715015911701366dbf6d86238bf6dd
parent9e2c8bd78488c722212a16ce3a5988fa1055e863
rpmsg: core: Clean up resources on announce_create failure.

commit 8066c615cb69b7da8a94f59379847b037b3a5e46 upstream.

During the rpmsg_dev_probe, if rpdev->ops->announce_create returns an
error, the rpmsg device and default endpoint should be freed before
exiting the function.

Fixes: 5e619b48677c ("rpmsg: Split rpmsg core and virtio backend")
Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211206190758.10004-1-arnaud.pouliquen@foss.st.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rpmsg/rpmsg_core.c