From: Justin Chen <justin.chen@broadcom•com>
To: Chen Jiahao <chenjiahao16@huawei•com>,
florian.fainelli@broadcom•com, davem@davemloft•net,
edumazet@google•com, kuba@kernel•org, pabeni@redhat•com,
bcm-kernel-feedback-list@broadcom•com, netdev@vger•kernel.org
Subject: Re: [PATCH -next] net: bcmasp: Clean up redundant dev_err_probe()
Date: Thu, 27 Jul 2023 13:46:42 -0700 [thread overview]
Message-ID: <a5d3884c-9366-cc67-ef65-e46294756654@broadcom.com> (raw)
In-Reply-To: <20230727115551.2655840-1-chenjiahao16@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
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@huawei•com>
Acked-by: Justin Chen <justin.chen@broadcom•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))
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4206 bytes --]
next prev parent reply other threads:[~2023-07-27 20:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 11:55 [PATCH -next] net: bcmasp: Clean up redundant dev_err_probe() Chen Jiahao
2023-07-27 13:32 ` Simon Horman
2023-07-28 8:11 ` chenjiahao (C)
2023-07-27 20:46 ` Justin Chen [this message]
2023-07-29 1:50 ` patchwork-bot+netdevbpf
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=a5d3884c-9366-cc67-ef65-e46294756654@broadcom.com \
--to=justin.chen@broadcom$(echo .)com \
--cc=bcm-kernel-feedback-list@broadcom$(echo .)com \
--cc=chenjiahao16@huawei$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=florian.fainelli@broadcom$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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