]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fbdev: omap2: fix inconsistent lock returns in omapfb_mmap
authorHongling Zeng <zenghongling@kylinos.cn>
Thu, 2 Apr 2026 09:34:03 +0000 (17:34 +0800)
committerHelge Deller <deller@gmx.de>
Thu, 9 Apr 2026 08:26:11 +0000 (10:26 +0200)
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>
drivers/video/fbdev/omap2/omapfb/omapfb-main.c

index a8b2930290e1ffd244ab5b329fcb55034f989999..d70deb6a915083237ec121b951297f6c3579aee7 100644 (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;
 }