From: Alexey Khoroshilov Date: Fri, 31 Oct 2014 22:40:47 +0000 (+0300) Subject: m501fb: don't return zero on failure path in sm501fb_probe() X-Git-Tag: omap-for-v3.19/fixes-rc1~128^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816764859a5347315cb2f1578cf0252ee129c128;p=pandora-kernel.git m501fb: don't return zero on failure path in sm501fb_probe() If no framebuffers found, sm501fb_probe() breaks off initialization, deallocates sm501fb_info, but returns zero. As a result, use after free can happen in sm501fb_remove(). The patch adds -ENODEV as a return value in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Tomi Valkeinen --- Reading git-diff-tree failed