clk: samsung: Remove useless check for return value of samsung_clk_init
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 9 May 2016 17:32:31 +0000 (19:32 +0200)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 2 Jun 2016 09:17:57 +0000 (11:17 +0200)
The samsung_clk_init() cannot return NULL. Either it returns allocated
memory or it panics.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/clk/samsung/clk-exynos4.c
drivers/clk/samsung/clk-exynos5250.c
drivers/clk/samsung/clk-exynos5420.c
drivers/clk/samsung/clk-exynos5440.c
drivers/clk/samsung/clk-s3c2410.c
drivers/clk/samsung/clk-s3c2412.c
drivers/clk/samsung/clk-s3c2443.c
drivers/clk/samsung/clk-s3c64xx.c
drivers/clk/samsung/clk-s5pv210.c

index 7b3d0f97598740240fecec3afa0e08e074933876..2f458233908bd14f4142a90605ec9ec9509c6ae6 100644 (file)
@@ -1450,8 +1450,6 @@ static void __init exynos4_clk_init(struct device_node *np,
                panic("%s: failed to map registers\n", __func__);
 
        ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        samsung_clk_of_register_fixed_ext(ctx, exynos4_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos4_fixed_rate_ext_clks),
index 837197db4ffbb5f1b3f9539e76ff1d755004c713..d8621cf317867b7db536852de528c159e37577d8 100644 (file)
@@ -805,8 +805,7 @@ static void __init exynos5250_clk_init(struct device_node *np)
        }
 
        ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
+
        samsung_clk_of_register_fixed_ext(ctx, exynos5250_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos5250_fixed_rate_ext_clks),
                        ext_clk_match);
index 92382cef9f90a2cc23c0c74ed11cad6e404c37c4..770c0f007c6bdee14aab09ed2a69a51aa6d057f1 100644 (file)
@@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np,
        exynos5x_soc = soc;
 
        ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos5x_fixed_rate_ext_clks),
index c57cff1e17980170cecc0cb33891241d9d214b40..22c73d4a5ee31b6b959fe3c4d02666a488a8c3ed 100644 (file)
@@ -125,8 +125,6 @@ static void __init exynos5440_clk_init(struct device_node *np)
        }
 
        ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        samsung_clk_of_register_fixed_ext(ctx, exynos5440_fixed_rate_ext_clks,
                ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match);
index d7b011c1fcf8859bbddd514a361d8d39e00f11ae..d7a1e772d95a97d67c8b6da5104af27358a7145a 100644 (file)
@@ -374,8 +374,6 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
        }
 
        ctx = samsung_clk_init(np, reg_base, NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        /* Register external clocks only in non-dt cases */
        if (!np)
index effe3736ec6b69bfa753e55d54e6615fde1caa98..ec873ee15d377b6f720e319cb6327744b4489d99 100644 (file)
@@ -265,8 +265,6 @@ void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
        }
 
        ctx = samsung_clk_init(np, reg_base, NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        /* Register external clocks only in non-dt cases */
        if (!np)
index 37562783b25e1733a36ac86b94ac31892ab002b9..5e24a17e10e676e2e76ae5efec06af0d9eb0e847 100644 (file)
@@ -400,8 +400,6 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
        }
 
        ctx = samsung_clk_init(np, reg_base, NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        /* Register external clocks only in non-dt cases */
        if (!np)
index 60aa775bd3745de6e6ce514b16e2c57be9a321cf..a48bd5f173301e9c0d1c21a94f0e27e52eeb6a9d 100644 (file)
@@ -471,8 +471,6 @@ void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
        }
 
        ctx = samsung_clk_init(np, reg_base, NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        /* Register external clocks. */
        if (!np)
index 52302262045d4cbd9bca00cda8d79d597f8cd14e..fd2725710a6fa968437e45a108555a7eb506dbc2 100644 (file)
@@ -784,8 +784,6 @@ static void __init __s5pv210_clk_init(struct device_node *np,
        struct samsung_clk_provider *ctx;
 
        ctx = samsung_clk_init(np, reg_base, NR_CLKS);
-       if (!ctx)
-               panic("%s: unable to allocate context.\n", __func__);
 
        samsung_clk_register_mux(ctx, early_mux_clks,
                                        ARRAY_SIZE(early_mux_clks));
This page took 0.030924 seconds and 5 git commands to generate.