ARM: davinci: fix a problematic usage of WARN()
authorGeliang Tang <geliangtang@163.com>
Thu, 26 Nov 2015 00:35:27 +0000 (08:35 +0800)
committerSekhar Nori <nsekhar@ti.com>
Tue, 15 Dec 2015 09:59:34 +0000 (15:29 +0530)
WARN() takes a condition and a format string. The condition was
omitted. So I added it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c

index b46b4d25f93e889b2aa8241be2a7cd303a5459c4..f80873e4215d2ab74857173c9e1c5c377601e779 100644 (file)
@@ -384,9 +384,7 @@ static __init void dm355_evm_init(void)
        dm355evm_dm9000_rsrc[2].start = gpio_to_irq(1);
 
        aemif = clk_get(&dm355evm_dm9000.dev, "aemif");
-       if (IS_ERR(aemif))
-               WARN("%s: unable to get AEMIF clock\n", __func__);
-       else
+       if (!WARN(IS_ERR(aemif), "unable to get AEMIF clock\n"))
                clk_prepare_enable(aemif);
 
        platform_add_devices(davinci_evm_devices,
index 680a7a2d9102761c1cdadb1d125b45d92b65d9c0..284ff27c1b32228d7b9cdcf1dd6cade90b8bd65d 100644 (file)
@@ -242,9 +242,7 @@ static __init void dm355_leopard_init(void)
        dm355leopard_dm9000_rsrc[2].start = gpio_to_irq(9);
 
        aemif = clk_get(&dm355leopard_dm9000.dev, "aemif");
-       if (IS_ERR(aemif))
-               WARN("%s: unable to get AEMIF clock\n", __func__);
-       else
+       if (!WARN(IS_ERR(aemif), "unable to get AEMIF clock\n"))
                clk_prepare_enable(aemif);
 
        platform_add_devices(davinci_leopard_devices,