blob: 5e70c00e93c4bde58078872e96a084215bdf4c6d [file] [log] [blame]
From ce77351c8ae6b04070135fdaedaad337bb0b4ef5 Mon Sep 17 00:00:00 2001
From: Rui Miguel Silva <rui.silva@linaro.org>
Date: Tue, 27 Sep 2022 10:05:27 +0100
Subject: [PATCH 4/6] rpmsg: arm: fix return value
The creation of and endpoint returns a pointer, fix the return
value to the right type.
Upstream-Status: Pending
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
---
drivers/rpmsg/rpmsg_arm_mailbox.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/rpmsg/rpmsg_arm_mailbox.c b/drivers/rpmsg/rpmsg_arm_mailbox.c
index 4a80102669f6..5c0dcc8e353d 100644
--- a/drivers/rpmsg/rpmsg_arm_mailbox.c
+++ b/drivers/rpmsg/rpmsg_arm_mailbox.c
@@ -103,8 +103,9 @@ static struct rpmsg_endpoint *arm_create_ept(struct rpmsg_device *rpdev,
channel->mbox = mbox_request_channel_byname(&channel->cl, chinfo.name);
if (IS_ERR_OR_NULL(channel->mbox)) {
- printk("RPMsg ARM: Cannot get channel by name: '%s'\n", chinfo.name);
- return -1;
+ printk("RPMsg ARM: Cannot get channel by name: %s\n",
+ chinfo.name);
+ return ERR_PTR(-ENOENT);
}
return &channel->ept;
--
2.39.0