[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1511302732-20771-1-git-send-email-gomonovych@gmail.com>
Date: Tue, 21 Nov 2017 23:18:52 +0100
From: Vasyl Gomonovych <gomonovych@...il.com>
To: davem@...emloft.net, grygorii.strashko@...com,
richardcochran@...il.com, w-kwok2@...com, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, gomonovych@...il.com
Subject: [PATCH] net: ethernet: ti: cpts: 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: Vasyl Gomonovych <gomonovych@...il.com>
---
drivers/net/ethernet/ti/cpts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
1.9.1
Powered by blists - more mailing lists