From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752859AbcEIRay (ORCPT ); Mon, 9 May 2016 13:30:54 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:34053 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302AbcEIRas (ORCPT ); Mon, 9 May 2016 13:30:48 -0400 Date: Mon, 9 May 2016 19:30:38 +0200 From: Krzysztof Kozlowski To: Javier Martinez Canillas Cc: Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Michael Turquette , Stephen Boyd , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init Message-ID: <20160509173038.GA2507@kozik-lap> References: <1462699496-16646-1-git-send-email-krzk@kernel.org> <4033d4d5-558d-898f-cdc9-07a19654ade6@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4033d4d5-558d-898f-cdc9-07a19654ade6@osg.samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- > > 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 Thanks, I'll change this everywhere. Best regards, Krzysztof