lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 20 Dec 2010 16:08:56 +0300 From: Dan Carpenter <error27@...il.com> To: Lars-Peter Clausen <lars@...afoo.de> Cc: Anton Vorontsov <cbouatmailru@...il.com>, linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org Subject: [patch -next] power/gpio-charger: check for kzalloc() failure Return -ENOMEM if kzalloc() fails. Signed-off-by: Dan Carpenter <error27@...il.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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists