Skip to content

Commit

Permalink
avr32: boards: setup: use IS_ERR() instead of NULL check
Browse files Browse the repository at this point in the history
clk_get() returns ERR_PTR() on error, not NULL.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
  • Loading branch information
Vasiliy Kulikov authored and Hans-Christian Egtvedt committed Jan 13, 2011
1 parent 3c0eee3 commit 36b471e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/avr32/boards/atngw100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/favr-32/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/hammerhead/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/merisc/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/boards/mimc200/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 36b471e

Please sign in to comment.