linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call
@ 2017-11-13 12:52 Axel Lin
  2017-11-16 11:23 ` Keerthy
  2017-11-16 19:29 ` Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2017-11-13 12:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: Keerthy, Liam Girdwood, linux-kernel, Axel Lin

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 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 bc489958fed7..b3f89ebfb1a0 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -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, &regulators[i],
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call
  2017-11-13 12:52 [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call Axel Lin
@ 2017-11-16 11:23 ` Keerthy
  2017-11-17  3:58   ` Axel Lin
  2017-11-16 19:29 ` Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Keerthy @ 2017-11-16 11:23 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Liam Girdwood, linux-kernel



On Monday 13 November 2017 06:22 PM, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

One line commit message would be better than blank commit message.
Otherwise:

Reviewed-by: Keerthy <j-keerthy@ti.com>

> ---
>  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 bc489958fed7..b3f89ebfb1a0 100644
> --- a/drivers/regulator/tps65218-regulator.c
> +++ b/drivers/regulator/tps65218-regulator.c
> @@ -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, &regulators[i],
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree
  2017-11-13 12:52 [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call Axel Lin
  2017-11-16 11:23 ` Keerthy
@ 2017-11-16 19:29 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-11-16 19:29 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Mark Brown, Keerthy, Liam Girdwood, linux-kernel,
	linux-kernel

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@ingics.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@ingics.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.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, &regulators[i],
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call
  2017-11-16 11:23 ` Keerthy
@ 2017-11-17  3:58   ` Axel Lin
  2017-11-17  4:11     ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2017-11-17  3:58 UTC (permalink / raw)
  To: Keerthy; +Cc: Mark Brown, Liam Girdwood, linux-kernel

2017-11-16 19:23 GMT+08:00 Keerthy <j-keerthy@ti.com>:
>
>
> On Monday 13 November 2017 06:22 PM, Axel Lin wrote:
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> One line commit message would be better than blank commit message.
It's just too trivial and checkpatch does not complain.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call
  2017-11-17  3:58   ` Axel Lin
@ 2017-11-17  4:11     ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2017-11-17  4:11 UTC (permalink / raw)
  To: Axel Lin, Keerthy; +Cc: Mark Brown, Liam Girdwood, linux-kernel, Linus Torvalds

On Fri, 2017-11-17 at 11:58 +0800, Axel Lin wrote:
> 2017-11-16 19:23 GMT+08:00 Keerthy <j-keerthy@ti.com>:
> > 
> > 
> > On Monday 13 November 2017 06:22 PM, Axel Lin wrote:
> > > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> > 
> > 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-17  4:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 12:52 [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call Axel Lin
2017-11-16 11:23 ` Keerthy
2017-11-17  3:58   ` Axel Lin
2017-11-17  4:11     ` Joe Perches
2017-11-16 19:29 ` Applied "regulator: tps65218: Add NULL test for devm_kzalloc call" to the regulator tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).