public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] rpmsg: char: Remove the unneeded result variable
@ 2022-08-26  7:19 cgel.zte
  2022-08-26  7:40 ` Mukesh Ojha
  2022-08-31 16:46 ` Mathieu Poirier
  0 siblings, 2 replies; 5+ messages in thread
From: cgel.zte @ 2022-08-26  7:19 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: mathieu.poirier, linux-remoteproc, linux-kernel, ye xingchen,
	Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

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>
---
 drivers/rpmsg/rpmsg_char.c | 5 +----
 1 file changed, 1 insertion(+), 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);
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-02 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-26  7:19 [PATCH linux-next] rpmsg: char: Remove the unneeded result variable cgel.zte
2022-08-26  7:40 ` Mukesh Ojha
2022-08-31 16:46 ` Mathieu Poirier
2022-09-01  5:32   ` cgel.zte
2022-09-02 19:32     ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox