Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1397226

Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init

From Krzysztof Kozlowski <krzk@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init
Date 2016-05-09 19:40 +0200
Message-ID <rwXjY-1J7-5@gated-at.bofh.it> (permalink)
References <rwtcd-424-5@gated-at.bofh.it> <rwTzK-6w5-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 09, 2016 at 09:32:47AM -0400, Javier Martinez Canillas wrote:
> Hello Krzysztof,
> 
> On 05/08/2016 05:24 AM, Krzysztof Kozlowski wrote:
> > The samsung_clk_init() cannot return NULL. Either it returns allocated
> > memory or it panics.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  drivers/clk/samsung/clk-exynos5420.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> > index 92382cef9f90..770c0f007c6b 100644
> > --- a/drivers/clk/samsung/clk-exynos5420.c
> > +++ b/drivers/clk/samsung/clk-exynos5420.c
> > @@ -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__);
> >
> 
> Indeed, the check is superfluous. I see that most callers [0] currently
> do the same, so probably makes sense to remove those too in this patch.
> 
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Thanks, I'll change this everywhere.


Best regards,
Krzysztof

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init Krzysztof Kozlowski <krzk@kernel.org> - 2016-05-08 11:30 +0200
  Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return  value of samsung_clk_init Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-09 15:40 +0200
    Re: [PATCH] clk: samsung: exynos5420: Remove useless check for  return value of samsung_clk_init Krzysztof Kozlowski <krzk@kernel.org> - 2016-05-09 19:40 +0200

csiph-web