提交 36b471e0 编写于 作者: V Vasiliy Kulikov 提交者: Hans-Christian Egtvedt

avr32: boards: setup: use IS_ERR() instead of NULL check

clk_get() returns ERR_PTR() on error, not NULL.
Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
Acked-by: NHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
上级 3c0eee3f
......@@ -188,7 +188,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
*/
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
......@@ -203,7 +203,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
*/
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
......@@ -206,7 +206,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
*/
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
......@@ -150,7 +150,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
......@@ -134,7 +134,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
......@@ -162,7 +162,7 @@ static void __init set_hw_addr(struct platform_device *pdev)
*/
regs = (void __iomem __force *)res->start;
pclk = clk_get(&pdev->dev, "pclk");
if (!pclk)
if (IS_ERR(pclk))
return;
clk_enable(pclk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册