[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171116192952.F086544005B@finisterre.ee.mobilebroadband>
Date: Thu, 16 Nov 2017 19:29:52 +0000 (GMT)
From: Mark Brown <broonie@...nel.org>
To: Axel Lin <axel.lin@...ics.com>
Cc: Mark Brown <broonie@...nel.org>, Mark Brown <broonie@...nel.org>,
Keerthy <j-keerthy@...com>, Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree
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 <axel.lin@...ics.com>
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 <axel.lin@...ics.com>
Reviewed-by: Keerthy <j-keerthy@...com>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
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
Powered by blists - more mailing lists