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: Hernán Gonzalez <hernan@vanguardiasur.com.ar> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
81c7288b17
Коммит
bde4c563a9
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче