Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929433ybl; Thu, 2 Jan 2020 15:01:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzUYOu1Tf6LTP84flWZLIhw8ogfTjqiBkKAjcgWvTcPncDPXSPUvdZDgiOmehigFBhvs6go X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr92425246otc.123.1578006108287; Thu, 02 Jan 2020 15:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006108; cv=none; d=google.com; s=arc-20160816; b=PRWTnqTM80ICg+jCsf9huS1FCMeVORVUpuuHyFPWLGBTH73S84oiom6MW5kaQdEuJW CwW2fumg8kqDpJQhNG1tMMZfE/+XpQ4OWsgdgnZVC7SIFPxwhz5BYRKvETxoh255SQYU XkmS7CrMsEaVqB6AL2ArHIOBXWXER0B08mrXpGGrsefUqIwRoqOx+g0XoIId1HOskIUQ Xh5hUsHe0Dhr2HsQkvJhnJIXDk1a93pgg3q0p9qvilrFmrJOlf0E8ZN8vJ40qMICL+Vg sLnHQM32Sch+k+lNG1pDbhVqZM7uglPusgFaK8SfNxIVNiHvxDjeN8JaYttlN3c4HzwV xGkw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KGiX8MDJzsfUCo8d92zWJtV2GVVI/cXtgaE3cCB6CiQ=; b=s9RyPP+WD4tx8JROJJeOvg7hfKPKFzrjwRlN/dyrPPjBcABuwPV+Y5xVDJ12IWZuHo npZ1mFh4oUxp5jwv4aKE5XZQolusZXZJOpsk40z/hrQ/nNJwILv5A91YQy1Qy3ECDZHL HFNTScoAMJfVTxauvdMzyf0WWzudSjDxaT4A4YijU44KET2RG1adPTIP0AyjgiMqohSS 3uGzGtrHN+xyuptF5X2sxSqOpXqSg3X6fDwtasfxwb2bO4h/lDbYVBgSDSLoB+uZrKvJ QsL9TB7xj1ca3d8l8xGKkG8JpckrnvJgdPeBQ9cjfhjgyQpCejk4DfC0POP4FBzBikVw UN6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rpdBwnRX; 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 k7si25915067oib.115.2020.01.02.15.01.36; Thu, 02 Jan 2020 15:01:48 -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; dkim=pass header.i=@kernel.org header.s=default header.b=rpdBwnRX; 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 S1727302AbgABWNY (ORCPT + 99 others); Thu, 2 Jan 2020 17:13:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:53056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbgABWNV (ORCPT ); Thu, 2 Jan 2020 17:13:21 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D76982253D; Thu, 2 Jan 2020 22:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003201; bh=OGwz1tlTUGcIn5PiAXyzlP4LVvsyzUKvmx8UgFMFhVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rpdBwnRXNrbUGEhtmFhsIynPnSrl7NlZKaGwtd3R7kRfVexBjuVtdRH3lt/M7XENh 5aYO8U3qxCA8dM9di9tXLhR0bDIDsFOwFn4O2AOpb4qzZLFI3AmS5Hg4dD8nwXvncr xfGHPxJhgw1gghE9MrqmizIFjTg9pWjVXlr7X1Yg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.4 036/191] clocksource/drivers/asm9260: Add a check for of_clk_get Date: Thu, 2 Jan 2020 23:05:18 +0100 Message-Id: <20200102215833.826677905@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan [ Upstream commit 6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad ] 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 Signed-off-by: Sasha Levin --- 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 9f09a59161e7..5b39d3701fa3 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) { -- 2.20.1