Skip to content

Commit

Permalink
clk: samsung: Remove useless check for return value of samsung_clk_init
Browse files Browse the repository at this point in the history
The samsung_clk_init() cannot return NULL. Either it returns allocated
memory or it panics.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Sylwester Nawrocki <[email protected]>
  • Loading branch information
krzk authored and Sylwester Nawrocki committed Jun 2, 2016
1 parent 9da752f commit dfb86ad
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-exynos4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 1 addition & 2 deletions drivers/clk/samsung/clk-exynos5250.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-exynos5420.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-exynos5440.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-s3c2412.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-s3c2443.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/samsung/clk-s5pv210.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit dfb86ad

Please sign in to comment.