Re: [PATCH linux-next] rpmsg: char: Remove the unneeded result variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/26/2022 12:49 PM, cgel.zte@xxxxxxxxx wrote:
From: ye xingchen <ye.xingchen@xxxxxxxxxx>

Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: ye xingchen <ye.xingchen@xxxxxxxxxx>
---
  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);
  }

LGTM.

Reviewed-by:Mukesh Ojha <quic_mojha@xxxxxxxxxxx>

-Mukesh



  EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux