Skip to content

Commit

Permalink
net: bcmasp: Clean up redundant dev_err_probe()
Browse files Browse the repository at this point in the history
Referring 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>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Justin Chen <justin.chen@broadcom.com>
Link: https://lore.kernel.org/r/20230727115551.2655840-1-chenjiahao16@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Chen Jiahao authored and Jakub Kicinski committed Jul 29, 2023
1 parent 61c5145 commit c88c157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/asp2/bcmasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c88c157

Please sign in to comment.