Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4235643ybx; Mon, 4 Nov 2019 09:55:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxblmYY56Q2fidQur+F/ZzRGb1vbEZLWs9b4DGDM9qoexLvQ90LGc5aUgxwIJeu7xfan9oh X-Received: by 2002:aa7:c943:: with SMTP id h3mr19775026edt.207.1572890157524; Mon, 04 Nov 2019 09:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572890157; cv=none; d=google.com; s=arc-20160816; b=dCe4fn9XRjJm+3wASXTB8WFviCkXNM5O2Mxtfg83/4CNtDZNf29/bCsNw7FVlvK6CM aq19CyrF74eHfXSORKj/SxPVjzNc0ns+8vK+md44YqXHX74sQUyoUu/9GoitPTY8XRYG OSE1M0mw1MN+moJuS/FfDbNFrEscP3ywy++puvTnE1jiXm4mSbFexNJlWO4J3Z568g3K iB1qqdxL8sE4qjUuDjR5hTljgc9tXOifi+64oclK/z0PZDyrJqgtvx3TdhlMZYSbVeSf NuL5VuWXcc/P4xa7n+Uq+kgQC4AvNk8GPwEFKpf159QmoSoUyh7q1j30ZyjpKmb3Cag/ uGmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=BBbyKQYLKvXIq6VST1x6DE7O50pGCR2t82G3GShnvkc=; b=JLTHn/eXzVlGqXalHb0Er85FdH1RPPSouJmSHuaX7CYZ790tAFns9zFUJ/djo4295d EuG9thDKPtBSiNSWFvq3+ysrN/L0nO2ry4nYykA9VI6jzbpydvzk/g64SxLTsuMMzBh6 h381vQHrp+xsHPvQ5A9PIfp5SQpMjvijE+qZB/neIjLhRvIDyQ4FPrSlJwkDic4+2evV WzrprZkwmF73lhGo6EAVJBgDGe1i13MRrxOWmnGPBLu3hh0Qy8MZvQJM12VPJfosYZi4 vcfIPjTiSIpQGWZK66KETqDjxkI/A9qGLNkGpgLKOOZSXkqRkFwCC3krZMvPimRoBa35 HePw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pw7si11878688ejb.157.2019.11.04.09.55.34; Mon, 04 Nov 2019 09:55:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729525AbfKDRy2 (ORCPT + 99 others); Mon, 4 Nov 2019 12:54:28 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:38036 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728766AbfKDRyV (ORCPT ); Mon, 4 Nov 2019 12:54:21 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iRgYQ-0002ZH-Ap; Mon, 04 Nov 2019 18:54:14 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id E2BD51C0017; Mon, 4 Nov 2019 18:54:13 +0100 (CET) Date: Mon, 04 Nov 2019 17:54:13 -0000 From: "tip-bot2 for Chuhong Yuan" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/asm9260: Add a check for of_clk_get Cc: Chuhong Yuan , Daniel Lezcano , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191016124330.22211-1-hslester96@gmail.com> References: <20191016124330.22211-1-hslester96@gmail.com> MIME-Version: 1.0 Message-ID: <157289005359.29376.7826557448523708212.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad Gitweb: https://git.kernel.org/tip/6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad Author: Chuhong Yuan AuthorDate: Wed, 16 Oct 2019 20:43:30 +08:00 Committer: Daniel Lezcano CommitterDate: Mon, 04 Nov 2019 10:40:10 +01:00 clocksource/drivers/asm9260: Add a check for of_clk_get asm9260_timer_init misses a check for of_clk_get. Add a check for it and print errors like other clocksource drivers. Signed-off-by: Chuhong Yuan Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016124330.22211-1-hslester96@gmail.com --- drivers/clocksource/asm9260_timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm9260_timer.c index 9f09a59..5b39d37 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c @@ -194,6 +194,10 @@ static int __init asm9260_timer_init(struct device_node *np) } clk = of_clk_get(np, 0); + if (IS_ERR(clk)) { + pr_err("Failed to get clk!\n"); + return PTR_ERR(clk); + } ret = clk_prepare_enable(clk); if (ret) {