All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Rodolfo Giometti <giometti@enneenne.com>,
	Ryan Govostes <rgovostes@whoi.edu>
Subject: Re: [PATCH v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line
Date: Fri, 26 Feb 2021 19:03:32 +0200	[thread overview]
Message-ID: <YDkp5Jh8ZXWgr+zl@smile.fi.intel.com> (raw)
In-Reply-To: <20210216113154.70852-1-andriy.shevchenko@linux.intel.com>

On Tue, Feb 16, 2021 at 01:31:48PM +0200, Andy Shevchenko wrote:
> When requesting optional GPIO echo line, bail out on error,
> so user will know that something wrong with the existing property.

Guys, any comments on this series?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/pps/clients/pps-gpio.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
> index e0de1df2ede0..f89c31aa66f1 100644
> --- a/drivers/pps/clients/pps-gpio.c
> +++ b/drivers/pps/clients/pps-gpio.c
> @@ -119,12 +119,12 @@ static int pps_gpio_setup(struct platform_device *pdev)
>  	data->echo_pin = devm_gpiod_get_optional(&pdev->dev,
>  			"echo",
>  			GPIOD_OUT_LOW);
> -	if (data->echo_pin) {
> -		if (IS_ERR(data->echo_pin)) {
> -			dev_err(&pdev->dev, "failed to request ECHO GPIO\n");
> -			return PTR_ERR(data->echo_pin);
> -		}
> +	if (IS_ERR(data->echo_pin)) {
> +		dev_err(&pdev->dev, "failed to request ECHO GPIO\n");
> +		return PTR_ERR(data->echo_pin);
> +	}
>  
> +	if (data->echo_pin) {
>  		ret = of_property_read_u32(np,
>  			"echo-active-ms",
>  			&value);
> -- 
> 2.30.0
> 

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2021-02-26 17:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 11:31 [PATCH v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 2/7] pps: clients: gpio: Use dev_err_probe() to avoid log noise Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 3/7] pps: clients: gpio: Remove redundant condition in ->remove() Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 4/7] pps: clients: gpio: Get rid of legacy platform data Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 5/7] pps: clients: gpio: Make use of device properties Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 6/7] pps: clients: gpio: Use struct device pointer directly Andy Shevchenko
2021-02-16 11:31 ` [PATCH v1 7/7] pps: clients: gpio: Rearrange optional stuff in pps_gpio_setup() Andy Shevchenko
2021-02-26 17:03 ` Andy Shevchenko [this message]
2021-03-09 10:47   ` [PATCH v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line Andy Shevchenko
2021-03-09 10:51     ` Rodolfo Giometti
2021-03-09 11:28       ` Andy Shevchenko
2021-03-09 12:33         ` Rodolfo Giometti

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=YDkp5Jh8ZXWgr+zl@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgovostes@whoi.edu \
    /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.