From: Colin Ian King Date: Fri, 17 Jul 2015 10:37:52 +0000 (+0100) Subject: mtd: physmap_of: fix null pointer deference when kzalloc returns null X-Git-Tag: omap-for-v4.3/fixes-rc1~116^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e0c19c9608483808e6b5c294e357fa456f058e1;p=pandora-kernel.git mtd: physmap_of: fix null pointer deference when kzalloc returns null 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 Signed-off-by: Brian Norris --- Reading git-diff-tree failed