OSDN Git Service

sm501fb: don't return zero on failure path in sm501fb_start()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Tue, 2 May 2017 11:47:53 +0000 (13:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:00:21 +0000 (11:00 +0100)
commite22a6754abda4ab563fce3f3241e71a8c917c979
tree12e0bd51237ffffcc390081095560f720873ffb8
parente5ea3b04080c790a1d8a1ec2e8526bebb66f497b
sm501fb: don't return zero on failure path in sm501fb_start()

[ Upstream commit dc85e9a87420613b3129d5cc5ecd79c58351c546 ]

If fbmem iomemory mapping failed, sm501fb_start() breaks off
initialization, deallocates resources, but returns zero.
As a result, double deallocation can happen in sm501fb_stop().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/sm501fb.c