Commit 36b471e0 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by 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: default avatarVasiliy Kulikov <segoon@openwall.com>
Acked-by: default avatarHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment