summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnandu Krishnan E <quic_anane@quicinc.com>2025-01-10 13:42:37 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 11:36:54 +0100
commitcb6d9db1a04e5bb14943c544f1e8615c8d50f1b8 (patch)
tree2b6a391d7313b6933c30e08b5cee3f8efe05a4be /drivers
parent6635332d246d7db89b90e145f2bf937406cecaf0 (diff)
downloadlinux-cb6d9db1a04e5bb14943c544f1e8615c8d50f1b8.tar.gz
linux-cb6d9db1a04e5bb14943c544f1e8615c8d50f1b8.tar.bz2
linux-cb6d9db1a04e5bb14943c544f1e8615c8d50f1b8.zip
misc: fastrpc: Deregister device nodes properly in error scenarios
commit 637c20002dc8c347001292664055bfbf56544ec6 upstream. During fastrpc_rpmsg_probe, if secure device node registration succeeds but non-secure device node registration fails, the secure device node deregister is not called during error cleanup. Add proper exit paths to ensure proper cleanup in case of error. Fixes: 3abe3ab3cdab ("misc: fastrpc: add secure domain support") Cc: stable@kernel.org Signed-off-by: Anandu Krishnan E <quic_anane@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134239.123603-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/fastrpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 48d08eeb2d20..ff144f0aa337 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2344,7 +2344,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
err = fastrpc_device_register(rdev, data, false, domains[domain_id]);
if (err)
- goto fdev_error;
+ goto populate_error;
break;
default:
err = -EINVAL;