linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Ray Jui <rjui@broadcom.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com, Keerthy <j-keerthy@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 6/6] gpio: zynq: Simplify with dev_err_probe()
Date: Fri, 28 Aug 2020 07:20:16 +0200	[thread overview]
Message-ID: <fb949e25-ae67-bc62-378d-7f73de9b2c07@xilinx.com> (raw)
In-Reply-To: <20200827200827.26462-6-krzk@kernel.org>



On 27. 08. 20 22:08, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/gpio/gpio-zynq.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
> index 53d1387592fd..0b5a17ab996f 100644
> --- a/drivers/gpio/gpio-zynq.c
> +++ b/drivers/gpio/gpio-zynq.c
> @@ -929,11 +929,9 @@ static int zynq_gpio_probe(struct platform_device *pdev)
>  
>  	/* Retrieve GPIO clock */
>  	gpio->clk = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(gpio->clk)) {
> -		if (PTR_ERR(gpio->clk) != -EPROBE_DEFER)
> -			dev_err(&pdev->dev, "input clock not found.\n");
> -		return PTR_ERR(gpio->clk);
> -	}
> +	if (IS_ERR(gpio->clk))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(gpio->clk), "input clock not found.\n");
> +
>  	ret = clk_prepare_enable(gpio->clk);
>  	if (ret) {
>  		dev_err(&pdev->dev, "Unable to enable clock.\n");
> 

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

  reply	other threads:[~2020-08-28  5:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 20:08 [PATCH 1/6] gpio: bcm-kona: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 2/6] gpio: davinci: " Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 3/6] gpio: omap: " Krzysztof Kozlowski
2020-08-28  8:01   ` Grygorii Strashko
2020-08-27 20:08 ` [PATCH 4/6] gpio: pca953x: " Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 5/6] gpio: pisosr: " Krzysztof Kozlowski
2020-08-27 20:08 ` [PATCH 6/6] gpio: zynq: " Krzysztof Kozlowski
2020-08-28  5:20   ` Michal Simek [this message]
2020-09-12  9:26   ` Linus Walleij
2020-08-28 10:03 ` [PATCH 1/6] gpio: bcm-kona: " Andy Shevchenko
2020-08-28 17:15 ` Florian Fainelli
2020-08-28 18:17 ` Bartosz Golaszewski
2020-09-12  9:27   ` Linus Walleij

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=fb949e25-ae67-bc62-378d-7f73de9b2c07@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=f.fainelli@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=ssantosh@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).