regulator: tps65218: Add NULL test for devm_kzalloc call
Subsystems (2)
PATCH 1/1 regulator: tps65218: Add NULL test for devm_kzalloc call
--- drivers/regulator/tps65218-regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/tps65218-regulator.c +2 -0
@@ -329,6 +329,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],
Signature · 1 line
2.11.0
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
One line commit message would be better than blank commit message. Otherwise:
Quoted 18 lines
--- drivers/regulator/tps65218-regulator.c | 2 ++ 1 file changed, 2 insertions(+)drivers/regulator/tps65218-regulator.c +2
-0@@ -329,6 +329,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],
2017-11-16 19:23 GMT+08:00 Keerthy <[email protected]>:
Quoted 6 lines · Axel Lin
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>One line commit message would be better than blank commit message.
It's just too trivial and checkpatch does not complain.
Quoted 9 lines · Axel Lin
2017-11-16 19:23 GMT+08:00 Keerthy <[email protected]>:
Quoted 6 lines · Axel Lin
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>One line commit message would be better than blank commit message.
It's just too trivial and checkpatch does not complain.
I think trivial commits don't need commit messages if the subject line is sufficiently descriptive.
Mark Brown
maintainerApplied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree
In reply to Axel LinThe 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
Quoted 1 line
From
5597bfb474d3ed84c1e0c73db620a257bbe127b6Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Mon, 13 Nov 2017 20:52:32 +0800
Subject: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call
--- drivers/regulator/tps65218-regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/tps65218-regulator.c +2 -0
@@ -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],
Signature · 1 line
2.14.1