From 7e0c19c9608483808e6b5c294e357fa456f058e1 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Fri, 17 Jul 2015 11:37:52 +0100 Subject: [PATCH] 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-format-patch failed