summaryrefslogtreecommitdiff
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-08-26 07:19:54 +0000
committerMathieu Poirier <mathieu.poirier@linaro.org>2022-09-02 13:25:47 -0600
commit06564be4c03ff0e0b88c5a4a14a6527fcb070ffd (patch)
treee8920fc051cd0fa80bf01978d3dc53f76e2242c1 /drivers/rpmsg
parent1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff)
rpmsg: char: Remove the unneeded result variable
Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220826071954.252485-1-ye.xingchen@zte.com.cn Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/rpmsg_char.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
index 4f2189111494..0850ae34fb88 100644
--- a/drivers/rpmsg/rpmsg_char.c
+++ b/drivers/rpmsg/rpmsg_char.c
@@ -424,15 +424,12 @@ int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent
struct rpmsg_channel_info chinfo)
{
struct rpmsg_eptdev *eptdev;
- int ret;
eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
if (IS_ERR(eptdev))
return PTR_ERR(eptdev);
- ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
-
- return ret;
+ return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
}
EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);