Re: [PATCH] mtd: fix null pointer deference when kzalloc returns null
From: Brian Norris
Date: Tue Aug 18 2015 - 20:59:24 EST
On Fri, Jul 17, 2015 at 11:37:52AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> static analysis by smatch caught the following error:
>
> drivers/mtd/maps/physmap_of.c:135 of_get_probes()
> error: potential null dereference 'res'. (kzalloc returns null)
>
> Check for failed kzalloc and return -ENOMEM in of_flash_probe if
> this occurs.
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Pushed to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/