fbdev: omap2: fix inconsistent lock returns in omapfb_mmap

Fix the warning about inconsistent returns for '&rg->lock' in
omapfb_mmap() function. The warning arises because the error path
uses 'ofbi->region' while the normal path uses 'rg'.

smatch warnings:
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:1126 omapfb_mmap()
warn: inconsistent returns '&rg->lock'.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Hongling Zeng
2026-04-02 17:34:03 +08:00
committed by Helge Deller
parent 3bea4a0ee8
commit 98cf7df6e0

View File

@@ -1121,7 +1121,7 @@ static int omapfb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
return 0;
error:
omapfb_put_mem_region(ofbi->region);
omapfb_put_mem_region(rg);
return r;
}