From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936710AbdKPTcY (ORCPT ); Thu, 16 Nov 2017 14:32:24 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:45356 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936600AbdKPT34 (ORCPT ); Thu, 16 Nov 2017 14:29:56 -0500 From: Mark Brown To: Axel Lin Cc: Mark Brown , Mark Brown , Keerthy , Liam Girdwood , linux-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree In-Reply-To: <20171113125232.9672-1-axel.lin@ingics.com> Message-Id: <20171116192952.F086544005B@finisterre.ee.mobilebroadband> Date: Thu, 16 Nov 2017 19:29:52 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch regulator: tps65218: Add NULL test for devm_kzalloc call has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 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 >>From 5597bfb474d3ed84c1e0c73db620a257bbe127b6 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 13 Nov 2017 20:52:32 +0800 Subject: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call Signed-off-by: Axel Lin Reviewed-by: Keerthy Signed-off-by: Mark Brown --- drivers/regulator/tps65218-regulator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index b6f705292aef..1827185beacc 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c @@ -326,6 +326,8 @@ static int tps65218_regulator_probe(struct platform_device *pdev) /* Allocate memory for strobes */ tps->strobes = devm_kzalloc(&pdev->dev, sizeof(u8) * TPS65218_NUM_REGULATOR, GFP_KERNEL); + if (!tps->strobes) + return -ENOMEM; for (i = 0; i < ARRAY_SIZE(regulators); i++) { rdev = devm_regulator_register(&pdev->dev, ®ulators[i], -- 2.14.1