All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] input/rmi4: simplify the return expression of rmi_driver_of_probe()
Date: Thu, 10 Dec 2020 22:38:02 -0800	[thread overview]
Message-ID: <X9MTyoZTLISShiMh@google.com> (raw)
In-Reply-To: <20201210140024.1665-1-zhengyongjun3@huawei.com>

On Thu, Dec 10, 2020 at 10:00:24PM +0800, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  drivers/input/rmi4/rmi_driver.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index 258d5fe3d395..eec5d926da25 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -991,14 +991,8 @@ static int rmi_driver_remove(struct device *dev)
>  static int rmi_driver_of_probe(struct device *dev,
>  				struct rmi_device_platform_data *pdata)
>  {
> -	int retval;
> -
> -	retval = rmi_of_property_read_u32(dev, &pdata->reset_delay_ms,
> +	return rmi_of_property_read_u32(dev, &pdata->reset_delay_ms,
>  					"syna,reset-delay-ms", 1);
> -	if (retval)
> -		return retval;
> -
> -	return 0;

The idea of this function is to potentially handle several device
properties, so I would prefer leaving it as is.

Thanks.

-- 
Dmitry

      reply	other threads:[~2020-12-11  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 14:00 [PATCH -next] input/rmi4: simplify the return expression of rmi_driver_of_probe() Zheng Yongjun
2020-12-11  6:38 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9MTyoZTLISShiMh@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhengyongjun3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.