From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6D71F36AB5F for ; Mon, 23 Feb 2026 19:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771873795; cv=none; b=Uu8GMUvi1GykdHOSDVtMBtzr5/Nqj0jcB2mGpFt0Lahrw57PTCq1s9d+da66pu5g27Y1UKl/adqNDp/yYu2MAKLUlEsYBfkDs4BX0qiNI3pYOioeOHL0Tkl9jG22c5wvRVuC7dS7KQiOzksHdZSyTBnHwTt5UO9cz+KjVaNkqCk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771873795; c=relaxed/simple; bh=TDAPgZdfZ54q09N6dYou6A3uiHAsSqlBnA2IVQkTalw=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=JgiIdJPmHVGK0QoQvQ5BNgMajiipj0DJfJtFg6PCSOyw9drBUR5xuHMc9tExw21RfvNmCM5k9OYuGGO/WU/fCF8IysTgGfnKqsG2VpxPQUGGtRJgBAnifDB4dHC8HfwZ/tDyILy4HnFiMHtD5tXVDB60+DQV7QakFUHIrBIDBWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q314YMrj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q314YMrj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72B7CC19421; Mon, 23 Feb 2026 19:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771873795; bh=TDAPgZdfZ54q09N6dYou6A3uiHAsSqlBnA2IVQkTalw=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=q314YMrjcYsF7/NxWfD4XFpDU9jS8SHUsLHT2x0GqOCR7SdhNN40CkfeEsVRuQxqd 63uFENabGsMSe9FLsTEh+rMji16GZSCbqm7sqvgo3N/Rz9KiC2ataSaUOMZPmln0Qe 1GzNOAEjr6okaZ8BSLtoVXWRMvELPMDyVi9C4tieuBXvw1JJobft9ULirKwXqE8gr8 kklLyUQawYelImfo6zjgnRtvCIfQwdCk6nyHmgChjl1Iu5GcftKADvKa4gQdVSauHH 3R4n6qkvcSsWiHjMHGDJHz/onpvU6o+jdAFLeMY4DgvLU3VLIjUOQI64mV+T5Vq5D1 6WG0NEJH+9qkA== From: Mark Brown To: Liam Girdwood , Yufan Chen Cc: linux-kernel@vger.kernel.org In-Reply-To: <20260222104035.90790-1-ericterminal@gmail.com> References: <20260222104035.90790-1-ericterminal@gmail.com> Subject: Re: [PATCH] regulator: tps65185: check devm_kzalloc() result in probe Message-Id: <177187379420.737587.7723100051792274376.b4-ty@kernel.org> Date: Mon, 23 Feb 2026 19:09:54 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.15-dev-47773 On Sun, 22 Feb 2026 18:40:35 +0800, Yufan Chen wrote: > tps65185_probe() dereferences the allocation result immediately by using data->regmap. If devm_kzalloc() returns NULL under memory pressure, this leads to a NULL pointer dereference. > > Add the missing allocation check and return -ENOMEM on failure. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/1] regulator: tps65185: check devm_kzalloc() result in probe commit: 4b73231b2a61c4142a027613d277a19c484dfcc3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark