[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5d3884c-9366-cc67-ef65-e46294756654@broadcom.com>
Date: Thu, 27 Jul 2023 13:46:42 -0700
From: Justin Chen <justin.chen@...adcom.com>
To: Chen Jiahao <chenjiahao16@...wei.com>, florian.fainelli@...adcom.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, bcm-kernel-feedback-list@...adcom.com,
netdev@...r.kernel.org
Subject: Re: [PATCH -next] net: bcmasp: Clean up redundant dev_err_probe()
On 7/27/23 4:55 AM, Chen Jiahao wrote:
> Refering to platform_get_irq()'s definition, the return value has
> already been checked, error message also been printed via
> dev_err_probe() if ret < 0. Calling dev_err_probe() one more time
> outside platform_get_irq() is obviously redundant.
>
> Removing dev_err_probe() outside platform_get_irq() to clean up
> above problem.
>
> Signed-off-by: Chen Jiahao <chenjiahao16@...wei.com>
Acked-by: Justin Chen <justin.chen@...adcom.com>
> ---
> drivers/net/ethernet/broadcom/asp2/bcmasp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> index a9984efff6d1..eb35ced1c8ba 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> @@ -1232,7 +1232,7 @@ static int bcmasp_probe(struct platform_device *pdev)
>
> priv->irq = platform_get_irq(pdev, 0);
> if (priv->irq <= 0)
> - return dev_err_probe(dev, -EINVAL, "invalid interrupt\n");
> + return -EINVAL;
>
> priv->clk = devm_clk_get_optional_enabled(dev, "sw_asp");
> if (IS_ERR(priv->clk))
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4206 bytes)
Powered by blists - more mailing lists