Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791936pjo; Thu, 2 Jan 2020 14:21:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxkE8A/lZQ2dTqhrDgLV0xUNXkp1o8orv3KFD7FQJUiZY0W1mv2IiQMmEuRk30Cx4ZoFR7c X-Received: by 2002:a05:6808:208:: with SMTP id l8mr2985361oie.112.1578003681904; Thu, 02 Jan 2020 14:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003681; cv=none; d=google.com; s=arc-20160816; b=L2Itc4qDTVOHFcLFTQPrOltXCd02pjHYygA59nhfVsG1XhDJyHAuIdDTjuERuxN5x7 aYGY26mdz4SCvjsK3qySIQn1SZSBY04guc1lzAEqovDNnJCrzDPoOeKQtsbqjup26XpE kUpAzcIHAcAS4ZsvmvmM+JBw3YRVnP3EV1dbj8p1PEeR0u+eRxqRu4tNFXaVpcn65vDh 8MyQH7gc+T8gREykzVct5hDtRRpYBVCmsM9uuXuDkgjfe4ICVmzq9faL51PMt60l3esU 9C8s9NrETZAECad7p0zar4WhakVf8plp7KljZPnizPbXkyMoDPPo/yV96LP4/SuZWE0T WG4Q== 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=ScPIUOY/aDoVVB/AUdURL16hCZyYr5/pLmEwCc9sRRc=; b=fW7Nx1isCF/sXM0fiXrBI1k5JV+CUoP2OeVs4cdpnDNMK8936xn1vPY9q52VrMuFsV UbRJWnbQ9HQhVwORjLvkqTvnBW/KbNT3dX/D1ScKs7dds9DMFxp5Kg3rrPQT63g4al9Z dmgoR1kw2MCtoVU1+NFZDZTbXgPGPPon1PJ17FvqHCE9QDRyookk8XmObEIG8qLsHJXr P46UmIK0KRUrVFDabnVsqFi5/QvUojKFQqFkea8EZ3HlWO9aNO4fJQBfwKBzKkvieHkz eT7JhwXua9WCDW8pM1KN7gCx8PG7Bz4AfYiTh0jzaxy3Mkj0MvHLjLM81tA3oeUINVNB nGfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MA/I5NXL"; 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 k15si22538605oij.134.2020.01.02.14.21.10; Thu, 02 Jan 2020 14:21:21 -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="MA/I5NXL"; 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 S1728626AbgABWTh (ORCPT + 99 others); Thu, 2 Jan 2020 17:19:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:35896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728616AbgABWTf (ORCPT ); Thu, 2 Jan 2020 17:19:35 -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 3106A22B48; Thu, 2 Jan 2020 22:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003574; bh=qgvavfl3RP/Pq37Dz8kMIa4I4h1H9glwWHzNIgnNXVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MA/I5NXLPMsDsrgRC2EsnSFLrrXtjsx2JDvpn4LMZhCgtbHYfd/rbbEW7MMFFO6m5 tBNJYHLRccDsI+6w6xvK1Z5+MnzGqolOKAO/4INm4XiBYyw+tAuxKcYzaZVo/gFSVk l3c3e8h/bBNIX+PCN13Z1i4ltiJv3ngNz8NXE53s= 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 4.19 018/114] clocksource/drivers/asm9260: Add a check for of_clk_get Date: Thu, 2 Jan 2020 23:06:30 +0100 Message-Id: <20200102220030.967811618@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@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 38cd2feb87c4..0ce760776406 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c @@ -198,6 +198,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