The patch titled drivers/power/gpio-charger.c: check for kzalloc() failure has been added to the -mm tree. Its filename is drivers-power-gpio-chargerc-check-for-kzalloc-failure.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/power/gpio-charger.c: check for kzalloc() failure From: Dan Carpenter <error27@xxxxxxxxx> Return -ENOMEM if kzalloc() fails. Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx> Cc: Anton Vorontsov <cbouatmailru@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/power/gpio-charger.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN drivers/power/gpio-charger.c~drivers-power-gpio-chargerc-check-for-kzalloc-failure drivers/power/gpio-charger.c --- a/drivers/power/gpio-charger.c~drivers-power-gpio-chargerc-check-for-kzalloc-failure +++ a/drivers/power/gpio-charger.c @@ -87,6 +87,8 @@ static int __devinit gpio_charger_probe( } gpio_charger = kzalloc(sizeof(*gpio_charger), GFP_KERNEL); + if (!gpio_charger) + return -ENOMEM; charger = &gpio_charger->charger; _ Patches currently in -mm which might be from error27@xxxxxxxxx are linux-next.patch arch-x86-oprofile-op_model_amdc-perform-initialisation-on-a-single-cpu.patch dca-remove-unneeded-null-check.patch drivers-power-gpio-chargerc-check-for-kzalloc-failure.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html