From: Sachin Kamat Date: Mon, 19 Nov 2012 09:44:58 +0000 (+0000) Subject: drm/fb_helper: Fix potential NULL pointer dereference X-Git-Tag: v3.8-rc1~82^2~182 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c5eaca012f963fa9724665f8a0eca19e3cb7d2a;p=pandora-kernel.git drm/fb_helper: Fix potential NULL pointer dereference kcalloc returns NULL on failure. Hence check for the return value and exit on error to avoid NULL pointer dereference. Fixes the following smatch errors: drivers/gpu/drm/drm_fb_helper.c:1271 drm_setup_crtcs() error: potential null dereference 'modes'. (kcalloc returns null) drivers/gpu/drm/drm_fb_helper.c:1272 drm_setup_crtcs() error: potential null dereference 'crtcs'. (kcalloc returns null) Signed-off-by: Sachin Kamat Signed-off-by: Dave Airlie --- Reading git-diff-tree failed