[lvc-project] [PATCH] staging: sm750fb: Remove unneeded setting of info->screen_size

Nikita Kiryushin kiryushin at ancud.ru
Fri Mar 1 22:53:29 MSK 2024


In lynxfb_set_fbinfo info->screen_size is set twice, the first value is
never used and then overwritten.

Remove the first time the value is set.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging")
Signed-off-by: Nikita Kiryushin <kiryushin at ancud.ru>
---
  drivers/staging/sm750fb/sm750.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sm750fb/sm750.c 
b/drivers/staging/sm750fb/sm750.c
index 04c1b32a22c5..70d1c8292df0 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -845,7 +845,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, 
int index)
  	info->pseudo_palette = &par->pseudo_palette[0];
  	info->screen_base = crtc->v_screen;
  	pr_debug("screen_base vaddr = %p\n", info->screen_base);
-	info->screen_size = line_length * var->yres_virtual;
   	/* set info->fix */
  	fix->type = FB_TYPE_PACKED_PIXELS;
-- 
2.34.1




More information about the lvc-project mailing list