Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934185AbcJaQSh (ORCPT ); Mon, 31 Oct 2016 12:18:37 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:60740 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933797AbcJaQSd (ORCPT ); Mon, 31 Oct 2016 12:18:33 -0400 Date: Mon, 31 Oct 2016 16:18:20 +0000 From: Russell King - ARM Linux To: Christophe JAILLET , arm@kernel.org Cc: vireshk@kernel.org, shiraz.linux.kernel@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] ARM: spear: Fix error handling Message-ID: <20161031161820.GI1041@n2100.armlinux.org.uk> References: <20161029135839.6388-1-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161029135839.6388-1-christophe.jaillet@wanadoo.fr> 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 Content-Length: 989 Lines: 32 For the spear or arm-soc guys to deal with... On Sat, Oct 29, 2016 at 03:58:39PM +0200, Christophe JAILLET wrote: > 'clk_get_sys()' returns an error pointer in case of error, not NULL. So > test it with IS_ERR. > > Signed-off-by: Christophe JAILLET > --- > arch/arm/mach-spear/time.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c > index 9ccffc1d0f28..4878ba90026d 100644 > --- a/arch/arm/mach-spear/time.c > +++ b/arch/arm/mach-spear/time.c > @@ -233,7 +233,7 @@ void __init spear_setup_of_timer(void) > } > > gpt_clk = clk_get_sys("gpt0", NULL); > - if (!gpt_clk) { > + if (IS_ERR(gpt_clk)) { > pr_err("%s:couldn't get clk for gpt\n", __func__); > goto err_iomap; > } > -- > 2.9.3 > -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.