Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209566

Re: [PATCH] mtd: fix null pointer deference when kzalloc returns null

From Brian Norris <computersforpeace@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mtd: fix null pointer deference when kzalloc returns null
Date 2015-08-19 03:00 +0200
Message-ID <pYZTr-6RF-9@gated-at.bofh.it> (permalink)
References <pNbdD-2PM-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 17, 2015 at 11:37:52AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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@canonical.com>

Pushed to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] mtd: fix null pointer deference when kzalloc returns null Brian Norris <computersforpeace@gmail.com> - 2015-08-19 03:00 +0200

csiph-web