mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
sm501fb: don't return zero on failure path in sm501fb_start()
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 <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
45f580c42e
commit
dc85e9a874
1 changed files with 1 additions and 0 deletions
|
|
@ -1600,6 +1600,7 @@ static int sm501fb_start(struct sm501fb_info *info,
|
|||
info->fbmem = ioremap(res->start, resource_size(res));
|
||||
if (info->fbmem == NULL) {
|
||||
dev_err(dev, "cannot remap framebuffer\n");
|
||||
ret = -ENXIO;
|
||||
goto err_mem_res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue