All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <error27@gmail.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] power/gpio-charger: check for kzalloc() failure
Date: Mon, 20 Dec 2010 20:04:54 +0000	[thread overview]
Message-ID: <4D0FB6E6.2060608@metafoo.de> (raw)
In-Reply-To: <20101220130856.GZ1936@bicker>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/20/2010 02:08 PM, Dan Carpenter wrote:
> Return -ENOMEM if kzalloc() fails.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index fccbe99..06a74f0 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -87,6 +87,8 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev)
>  	}
>  
>  	gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL);
> +	if (!gpio_charger)
> +		return -ENOMEM;
>  
>  	charger = &gpio_charger->charger;
>  

Hi

This is now the 4th patch or so fixing this issue. I send the first one[1], together
with some other fixes[2][3], a month ago.

Anton could you please pick them up?

Thanks
- - Lars

[1] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02029.html
[2] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02028.html
[3] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02030.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0PtuYACgkQBX4mSR26RiOCRQCfdKUdpAjX2GxAJuGVekZDiyjx
j3IAnRCS562ud3Ali/B5V1gWNeBHcxNj
=M4Vg
-----END PGP SIGNATURE-----

WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <error27@gmail.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] power/gpio-charger: check for kzalloc() failure
Date: Mon, 20 Dec 2010 21:04:54 +0100	[thread overview]
Message-ID: <4D0FB6E6.2060608@metafoo.de> (raw)
In-Reply-To: <20101220130856.GZ1936@bicker>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/20/2010 02:08 PM, Dan Carpenter wrote:
> Return -ENOMEM if kzalloc() fails.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index fccbe99..06a74f0 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -87,6 +87,8 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev)
>  	}
>  
>  	gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL);
> +	if (!gpio_charger)
> +		return -ENOMEM;
>  
>  	charger = &gpio_charger->charger;
>  

Hi

This is now the 4th patch or so fixing this issue. I send the first one[1], together
with some other fixes[2][3], a month ago.

Anton could you please pick them up?

Thanks
- - Lars

[1] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02029.html
[2] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02028.html
[3] http://lkml.indiana.edu/hypermail/linux/kernel/1011.2/02030.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0PtuYACgkQBX4mSR26RiOCRQCfdKUdpAjX2GxAJuGVekZDiyjx
j3IAnRCS562ud3Ali/B5V1gWNeBHcxNj
=M4Vg
-----END PGP SIGNATURE-----

  reply	other threads:[~2010-12-20 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 13:08 [patch -next] power/gpio-charger: check for kzalloc() failure Dan Carpenter
2010-12-20 13:08 ` Dan Carpenter
2010-12-20 20:04 ` Lars-Peter Clausen [this message]
2010-12-20 20:04   ` Lars-Peter Clausen
2010-12-20 20:30   ` Dan Carpenter
2010-12-20 20:30     ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D0FB6E6.2060608@metafoo.de \
    --to=lars@metafoo.de \
    --cc=cbouatmailru@gmail.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.