Commit 98cf7df6 authored by Hongling Zeng's avatar Hongling Zeng Committed by Helge Deller
Browse files

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarHongling Zeng <zenghongling@kylinos.cn>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 3bea4a0e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}