public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Chuhong Yuan <hslester96@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 4.9 11/42] clocksource/drivers/asm9260: Add a check for of_clk_get
Date: Wed, 11 Dec 2019 10:34:39 -0500	[thread overview]
Message-ID: <20191211153510.23861-11-sashal@kernel.org> (raw)
In-Reply-To: <20191211153510.23861-1-sashal@kernel.org>

From: Chuhong Yuan <hslester96@gmail.com>

[ 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 <hslester96@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191016124330.22211-1-hslester96@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 1ba871b7fe118..e5717807c00a7 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


  parent reply	other threads:[~2019-12-11 15:38 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 15:34 [PATCH AUTOSEL 4.9 01/42] scsi: mpt3sas: Fix clear pending bit in ioctl status Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 02/42] scsi: lpfc: Fix locking on mailbox command completion Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 03/42] Input: atmel_mxt_ts - disable IRQ across suspend Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 04/42] iommu/tegra-smmu: Fix page tables in > 4 GiB memory Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 05/42] scsi: target: compare full CHAP_A Algorithm strings Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 06/42] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 07/42] scsi: csiostor: Don't enable IRQs too early Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 08/42] powerpc/pseries: Mark accumulate_stolen_time() as notrace Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 09/42] powerpc/pseries: Don't fail hash page table insert for bolted mapping Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 10/42] dma-debug: add a schedule point in debug_dma_dump_mappings() Sasha Levin
2019-12-11 15:34 ` Sasha Levin [this message]
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 12/42] powerpc/security/book3s64: Report L1TF status in sysfs Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 13/42] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 14/42] jbd2: Fix statistics for the number of logged blocks Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 15/42] scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6) Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 16/42] scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 17/42] clk: qcom: Allow constant ratio freq tables for rcg Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 18/42] irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 19/42] irqchip: ingenic: Error out if IRQ domain creation failed Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 20/42] mfd: mfd-core: Honour Device Tree's request to disable a child-device Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 21/42] fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 22/42] scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 23/42] scsi: ufs: fix potential bug which ends in system hang Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 24/42] powerpc/pseries/cmm: Implement release() function for sysfs device Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 25/42] powerpc/security: Fix wrong message when RFI Flush is disable Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 26/42] scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 27/42] clk: pxa: fix one of the pxa RTC clocks Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 28/42] bcache: at least try to shrink 1 node in bch_mca_scan() Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 29/42] ext4: fix a bug in ext4_wait_for_tail_page_commit Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 30/42] HID: Improve Windows Precision Touchpad detection Sasha Levin
2019-12-11 15:34 ` [PATCH AUTOSEL 4.9 31/42] ext4: work around deleting a file with i_nlink == 0 safely Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 32/42] scsi: pm80xx: Fix for SATA device discovery Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 33/42] scsi: scsi_debug: num_tgts must be >= 0 Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 34/42] scsi: target: iscsi: Wait for all commands to finish before freeing a session Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 35/42] gpio: mpc8xxx: Don't overwrite default irq_set_type callback Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 36/42] scripts/kallsyms: fix definitely-lost memory leak Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 37/42] cdrom: respect device capabilities during opening action Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 38/42] perf regs: Make perf_reg_name() return "unknown" instead of NULL Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 39/42] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 40/42] s390/cpum_sf: Check for SDBT and SDB consistency Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 41/42] ocfs2: fix passing zero to 'PTR_ERR' warning Sasha Levin
2019-12-11 15:35 ` [PATCH AUTOSEL 4.9 42/42] kernel: sysctl: make drop_caches write-only Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211153510.23861-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=hslester96@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox