diff options
author | Hernán Gonzalez <hernan@vanguardiasur.com.ar> | 2018-05-13 20:33:49 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-14 16:27:59 -0400 |
commit | bde4c563a93f643cee9854b0d354710e1ff69284 (patch) | |
tree | 3e2d38e59da56c2c1b25d080231730a458d19fa1 /drivers/net/ethernet/ti | |
parent | 81c7288b170a59d01427fa33d6591da1dbf59277 (diff) | |
download | linux-stable-bde4c563a93f643cee9854b0d354710e1ff69284.tar.gz linux-stable-bde4c563a93f643cee9854b0d354710e1ff69284.tar.bz2 linux-stable-bde4c563a93f643cee9854b0d354710e1ff69284.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index e7b76f6b4f67..7842f094f2ef 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -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); |