From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartosz Golaszewski Subject: [PATCH 04/17] ARM: davinci: da850: WARN() if clk_get() fails Date: Fri, 11 Jan 2019 18:21:21 +0100 Message-ID: <20190111172134.30147-5-brgl@bgdev.pl> References: <20190111172134.30147-1-brgl@bgdev.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190111172134.30147-1-brgl@bgdev.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Sekhar Nori , Kevin Hilman , Daniel Lezcano , Rob Herring , Mark Rutland , Thomas Gleixner Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski List-Id: devicetree@vger.kernel.org From: Bartosz Golaszewski Currently the timer code checks if the clock pointer passed to it is good (!IS_ERR(clk)). The new clocksource driver expects the clock to be functional and doesn't perform any checks so emit a warning if clk_get() fails. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/da850.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e7b78df2bfef..9ff377f26c4b 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -774,6 +774,7 @@ void __init da850_init_time(void) da850_pll0_init(NULL, pll0, cfgchip); clk = clk_get(NULL, "timer0"); + WARN(IS_ERR(clk), "Unable to get the timer clock\n"); davinci_timer_init(clk); } -- 2.19.1