[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <089f50b7-a87e-8570-d85f-be7470153493@quicinc.com>
Date: Fri, 26 Aug 2022 13:10:18 +0530
From: Mukesh Ojha <quic_mojha@...cinc.com>
To: <cgel.zte@...il.com>, <bjorn.andersson@...aro.org>
CC: <mathieu.poirier@...aro.org>, <linux-remoteproc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] rpmsg: char: Remove the unneeded result
variable
On 8/26/2022 12:49 PM, cgel.zte@...il.com wrote:
> From: ye xingchen <ye.xingchen@....com.cn>
>
> Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
> in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....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);
> }
LGTM.
Reviewed-by:Mukesh Ojha <quic_mojha@...cinc.com>
-Mukesh
> EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
>
Powered by blists - more mailing lists