commit | 816764859a5347315cb2f1578cf0252ee129c128 | [log] [tgz] |
---|---|---|
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | Sat Nov 01 01:40:47 2014 +0300 |
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | Thu Nov 06 16:41:36 2014 +0200 |
tree | e8a065da665352fcbc1b63712b80651f75fd07da | |
parent | d301a5ac1688bf99039adb10b4516b465f1f7a83 [diff] |
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 <khoroshilov@ispras.ru> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>