Commit c88c157d authored by Chen Jiahao's avatar Chen Jiahao Committed by Jakub Kicinski

net: bcmasp: Clean up redundant dev_err_probe()

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: default avatarChen Jiahao <chenjiahao16@huawei.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Acked-by: default avatarJustin Chen <justin.chen@broadcom.com>
Link: https://lore.kernel.org/r/20230727115551.2655840-1-chenjiahao16@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 61c51453
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment