[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGt4E5s4t+O=8P=HOZo_vN3S3RgOucyaUvLy3GoOhMYCSzbG+A@mail.gmail.com>
Date: Fri, 28 Aug 2020 09:12:01 -0700
From: Markus Mayer <mmayer@...adcom.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
Florian Fainelli <f.fainelli@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Linux ARM Kernel <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH 1/2] memory: brcmstb_dpfe: Simplify with dev_err_probe()
On Fri, 28 Aug 2020 at 08:37, Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe(). Less code and the error value gets printed.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
Acked-by: Markus Mayer <mmayer@...adcom.com>
> ---
> drivers/memory/brcmstb_dpfe.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
> index dcf50bb8dd69..f43ba69fbb3e 100644
> --- a/drivers/memory/brcmstb_dpfe.c
> +++ b/drivers/memory/brcmstb_dpfe.c
> @@ -901,11 +901,8 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev)
> }
>
> ret = brcmstb_dpfe_download_firmware(priv);
> - if (ret) {
> - if (ret != -EPROBE_DEFER)
> - dev_err(dev, "Couldn't download firmware -- %d\n", ret);
> - return ret;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "Couldn't download firmware\n");
>
> ret = sysfs_create_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
> if (!ret)
> --
> 2.17.1
>
Powered by blists - more mailing lists