public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbdev: omap2: fix inconsistent lock returns in omapfb_mmap
@ 2026-04-02  9:34 zenghongling
  2026-04-09  8:29 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: zenghongling @ 2026-04-02  9:34 UTC (permalink / raw)
  To: deller, linux-omap, linux-fbdev, dri-devel
  Cc: linux-kernel, zhongling0719, zenghongling, kernel test robot

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: zenghongling <zenghongling@kylinos.cn>
---
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index a8b2930290e1..d70deb6a9150 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbdev: omap2: fix inconsistent lock returns in omapfb_mmap
  2026-04-02  9:34 [PATCH] fbdev: omap2: fix inconsistent lock returns in omapfb_mmap zenghongling
@ 2026-04-09  8:29 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2026-04-09  8:29 UTC (permalink / raw)
  To: zenghongling, linux-omap, linux-fbdev, dri-devel
  Cc: linux-kernel, zhongling0719, kernel test robot

On 4/2/26 11:34, zenghongling wrote:
> 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: zenghongling <zenghongling@kylinos.cn>
> ---
>   drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

applied.
PS: I replaced author/email name by "Hongling Zeng" instead of "zenghongling".
I assume that's Ok, if not please let me know.

Thanks!
Helge

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-09  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02  9:34 [PATCH] fbdev: omap2: fix inconsistent lock returns in omapfb_mmap zenghongling
2026-04-09  8:29 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox