Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17939177ybl; Thu, 2 Jan 2020 15:11:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzB9n20QdDsdK8wWiiIWgMAggDyUWMWJYjutxf77TA6FsZcue3OpqeK7sF2mhYLq3ntzlYw X-Received: by 2002:a9d:730e:: with SMTP id e14mr89493451otk.62.1578006711221; Thu, 02 Jan 2020 15:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006711; cv=none; d=google.com; s=arc-20160816; b=Jxs7iy7QUnFb9wYnfRFLA1MBXN2RWOfT0+IWk8j0s42ygpAcURFNDD1RsgLA7ObwK1 hWHatBC78WvO+8ma7F4LDQUiu34duPbTf3SPVFhPk1hl2Z/woIUpiioV8nHlEl1sa6uY YzOr3xehPm1eU6FbbZLllAMHEsUdWC2i+u8lp9krNZX/q8T5C/h01hrp8J8q0wsAEher uparJCzctMlVudXYjG8Hs0XaJIooPf7zus7E+D3efACeGwj0qfpzXtuQRDIyz1jkneSm VjlxzN+n7/J3IkojUORPZJekFsKQeFgnASfSkYiSg/K92vqRK5stA2P1PHPBpuHMIKq6 K5NQ== 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=5jela2cFB5mRwAcr1w9Vx6pefOwP77cVL02zQFpLGH8=; b=ihZych6qxDYYB9GYjaOYauCIZDlhg7xfIr5nuxbPCM3vVrjG5zscqDeoIGPxus83aY U7szlx2ap+bFavhW02yqFyew+NGJoChw+drB7Lx8zbZRw4IqHsIjLXFmF/JYNpXxq5lG XhRscaomYpx6S2DjW9lkpGfG1nI0cdYNfgaqEndqe67ZNkfvfS3LLB1YsReAsqpVrxnt Rx31x1TbekH0XFJx7sPJY0XMA1WYAgeiHkYzzMwR0UqGrv7pnI6axFE7fMXk2avvfd1c 5M6WzrbVyN7rEkR6Xxt0NpzNZ12G5nTC96YO0CZIC8hNfp8NLxOaR98UrzEubEoTmiAM +8DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vIhRJOgC; 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 c17si26587060otp.131.2020.01.02.15.11.39; Thu, 02 Jan 2020 15:11:51 -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=vIhRJOgC; 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 S1731116AbgABWhm (ORCPT + 99 others); Thu, 2 Jan 2020 17:37:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:50364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731107AbgABWhi (ORCPT ); Thu, 2 Jan 2020 17:37:38 -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 356BE20866; Thu, 2 Jan 2020 22:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004657; bh=DlMgruxUavY/yDjUbcfaObemlMrERpWGQGiTZD65ZEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vIhRJOgCCV2RicTrPsxCam32ucO6Bn+WCwLGK7W6JFea9mhcx5/HGL/C4/BkO4GMD yBq4Qhih085CGl9H+ok+fJpuLSOBfk2KzMbnXigwicBETKjnz6kikXhDg5GmEmjbBE elHckpRtDK7zfGQjHTTM7XDI9CnTXn/tNzrAe+eA= 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.4 099/137] clocksource/drivers/asm9260: Add a check for of_clk_get Date: Thu, 2 Jan 2020 23:07:52 +0100 Message-Id: <20200102220600.371316602@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@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 217438d39eb3..38a28240f84f 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c @@ -196,6 +196,10 @@ static void __init asm9260_timer_init(struct device_node *np) panic("%s: unable to map resource", np->name); 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