avr32: boards: setup: use IS_ERR() instead of NULL check
Vasiliy Kulikov [Fri, 26 Nov 2010 17:06:12 +0000 (20:06 +0300)]
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>

arch/avr32/boards/atngw100/setup.c
arch/avr32/boards/atstk1000/atstk1002.c
arch/avr32/boards/favr-32/setup.c
arch/avr32/boards/hammerhead/setup.c
arch/avr32/boards/merisc/setup.c
arch/avr32/boards/mimc200/setup.c

index 8c6a244..659d119 100644 (file)
@@ -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);
index 2adc261..6ce30fb 100644 (file)
@@ -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);
index 75f19f4..86fab77 100644 (file)
@@ -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);
index dd00987..da14fbd 100644 (file)
@@ -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);
index 623b077..e61bc94 100644 (file)
@@ -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);
index 523d8e1..c4da5cb 100644 (file)
@@ -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);