Commit dfb86ade authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Sylwester Nawrocki

clk: samsung: Remove useless check for return value of samsung_clk_init

The samsung_clk_init() cannot return NULL. Either it returns allocated
memory or it panics.
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
parent 9da752f0
...@@ -1450,8 +1450,6 @@ static void __init exynos4_clk_init(struct device_node *np, ...@@ -1450,8 +1450,6 @@ static void __init exynos4_clk_init(struct device_node *np,
panic("%s: failed to map registers\n", __func__); panic("%s: failed to map registers\n", __func__);
ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 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, samsung_clk_of_register_fixed_ext(ctx, exynos4_fixed_rate_ext_clks,
ARRAY_SIZE(exynos4_fixed_rate_ext_clks), ARRAY_SIZE(exynos4_fixed_rate_ext_clks),
......
...@@ -805,8 +805,7 @@ static void __init exynos5250_clk_init(struct device_node *np) ...@@ -805,8 +805,7 @@ static void __init exynos5250_clk_init(struct device_node *np)
} }
ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 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, samsung_clk_of_register_fixed_ext(ctx, exynos5250_fixed_rate_ext_clks,
ARRAY_SIZE(exynos5250_fixed_rate_ext_clks), ARRAY_SIZE(exynos5250_fixed_rate_ext_clks),
ext_clk_match); ext_clk_match);
......
...@@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np, ...@@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np,
exynos5x_soc = soc; exynos5x_soc = soc;
ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 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, samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks,
ARRAY_SIZE(exynos5x_fixed_rate_ext_clks), ARRAY_SIZE(exynos5x_fixed_rate_ext_clks),
......
...@@ -125,8 +125,6 @@ static void __init exynos5440_clk_init(struct device_node *np) ...@@ -125,8 +125,6 @@ static void __init exynos5440_clk_init(struct device_node *np)
} }
ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 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, samsung_clk_of_register_fixed_ext(ctx, exynos5440_fixed_rate_ext_clks,
ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match); ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match);
......
...@@ -374,8 +374,6 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, ...@@ -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); 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 */ /* Register external clocks only in non-dt cases */
if (!np) if (!np)
......
...@@ -265,8 +265,6 @@ void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f, ...@@ -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); 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 */ /* Register external clocks only in non-dt cases */
if (!np) if (!np)
......
...@@ -400,8 +400,6 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f, ...@@ -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); 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 */ /* Register external clocks only in non-dt cases */
if (!np) if (!np)
......
...@@ -471,8 +471,6 @@ void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, ...@@ -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); ctx = samsung_clk_init(np, reg_base, NR_CLKS);
if (!ctx)
panic("%s: unable to allocate context.\n", __func__);
/* Register external clocks. */ /* Register external clocks. */
if (!np) if (!np)
......
...@@ -784,8 +784,6 @@ static void __init __s5pv210_clk_init(struct device_node *np, ...@@ -784,8 +784,6 @@ static void __init __s5pv210_clk_init(struct device_node *np,
struct samsung_clk_provider *ctx; struct samsung_clk_provider *ctx;
ctx = samsung_clk_init(np, reg_base, NR_CLKS); 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, samsung_clk_register_mux(ctx, early_mux_clks,
ARRAY_SIZE(early_mux_clks)); ARRAY_SIZE(early_mux_clks));
......
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