From nobody Sat Apr 18 17:06:27 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38B0937CD3C; Sun, 12 Apr 2026 20:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776026360; cv=none; b=GNc3ZO9gASvBubkZh9dUw6LO2Obf2z80ls/eKoIQsUKXukAK1sTgzs3wgRYYBqEMZXThyCa0ZDmp+tM3mcFSji4cfUe7MrEGmsdHW/ic/XrcrhOZckEPF8ccDJaLyqCb2qpZqwP03xUgx4yyjPDWCDW+yXDANTpELVS2AKzPHIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776026360; c=relaxed/simple; bh=C8wVOEdCEXU/1MspTdTJvJuXsrOBW8oQRP1WuaxsdtY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ITmodtPfwnZbj8hMkRu94AxlVwfUg7ubSqmjjUuSGEnEFiNOModqYOEllEIdMvsOf+KoWit4pwWnvP7Zvxo1/swnfPi+O+vCBFywZX9/HJPGz43wJbP3E7qASOP6p4/iXCQScH31mHSe8Pf2r+gcqcStfOUg7OqTMJ4nwfjTFHc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SfuDFpSP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gAYqLk3S; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SfuDFpSP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gAYqLk3S" Date: Sun, 12 Apr 2026 20:39:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1776026351; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5oTs0F2CDa+PbaJzODqJ+CxT2dIUv2DV12NprATNUOQ=; b=SfuDFpSPgdXvHmSFPj1SASegN+1t0OlRTOInxtIi82TPrwBnEWVoJ75GDgC2BkqCe+Tb3L ZkbVMFTWcxBQyLKHkXCWKqmaPFKWS9oHK1aDljNio3ydRIRVGj16mTw2NZ9YhhIsKR8idh VKh0qQIZzsdvUAGNPEsdzmFNI74kJGq3YFzyrvoEwNqACG7g0egxWuBlsVyPuVbGxM7ATt cjUOloz274Ppc/kcbBkb5FFZs+Oq8GypEkDYat/RysIf/Yx1PPmoj1fYKjL2YAW8N9RqQc JUyfMtHQLwWmeOKfvT+wzGva9D6G++hw7gPUhQidrkD7tPN4x4gWoeI/hmEZLQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1776026351; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5oTs0F2CDa+PbaJzODqJ+CxT2dIUv2DV12NprATNUOQ=; b=gAYqLk3Sbh0+p+KBpXq4TL90TOwFSkPMD1pPlo+A+Jz93RsWCYq+mtpPpoW1so9ldWCznH NeGi/UCk9QPoKyAA== From: "tip-bot2 for Chen Ni" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/clocksource] clocksource/drivers/sun5i: Handle error returns from devm_reset_control_get_optional_exclusive() Cc: Chen Ni , Daniel Lezcano , "Chen-Yu Tsai" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260205084037.3661261-1-nichen@iscas.ac.cn> References: <20260205084037.3661261-1-nichen@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177602635065.1323100.14465057866796993987.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/clocksource branch of = tip: Commit-ID: fed9f727cc3f91dde8278961269419083502b40e Gitweb: https://git.kernel.org/tip/fed9f727cc3f91dde8278961269419083= 502b40e Author: Chen Ni AuthorDate: Thu, 05 Feb 2026 16:40:37 +08:00 Committer: Daniel Lezcano CommitterDate: Tue, 24 Mar 2026 18:30:44 +01:00 clocksource/drivers/sun5i: Handle error returns from devm_reset_control_get= _optional_exclusive() The devm_reset_control_get_optional_exclusive() function may return an ERR_PTR in case of genuine reset control acquisition errors, not just NULL which indicates the legitimate absence of an optional reset. Add an IS_ERR() check after the call in sun5i_timer_probe(). On error, return the error code to ensure proper failure handling rather than proceeding with invalid pointers. Fixes: 7e5bac610d2f ("clocksource/drivers/sun5i: Convert to platform device= driver") Signed-off-by: Chen Ni Signed-off-by: Daniel Lezcano Acked-by: Chen-Yu Tsai Link: https://patch.msgid.link/20260205084037.3661261-1-nichen@iscas.ac.cn --- drivers/clocksource/timer-sun5i.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-= sun5i.c index f827d3f..d7e0129 100644 --- a/drivers/clocksource/timer-sun5i.c +++ b/drivers/clocksource/timer-sun5i.c @@ -286,6 +286,9 @@ static int sun5i_timer_probe(struct platform_device *pd= ev) } =20 rstc =3D devm_reset_control_get_optional_exclusive(dev, NULL); + if (IS_ERR(rstc)) + return dev_err_probe(dev, PTR_ERR(rstc), + "failed to get reset\n"); if (rstc) reset_control_deassert(rstc); =20