Commit bde4c563 authored by Hernán Gonzalez's avatar Hernán Gonzalez Committed by David S. Miller

net: ethernet: ti: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

drivers/net/ethernet/ti/cpts.c:567:9-16: WARNING: ERR_CAST can be used with cpts->refclk
Generated by: scripts/coccinelle/api/err_cast.cocci
Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81c7288b
......@@ -564,7 +564,7 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs,
cpts->refclk = devm_clk_get(dev, "cpts");
if (IS_ERR(cpts->refclk)) {
dev_err(dev, "Failed to get cpts refclk\n");
return ERR_PTR(PTR_ERR(cpts->refclk));
return ERR_CAST(cpts->refclk);
}
clk_prepare(cpts->refclk);
......
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