* [PATCH] fbdev: omapfb: remove duplicate check in omapfb_setup_mem()
@ 2026-01-08 20:00 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-01-08 20:00 UTC (permalink / raw)
To: Helge Deller
Cc: Thomas Zimmermann, linux-fbdev, linux-omap, dri-devel,
linux-kernel, kernel-janitors
We know "size" is non-zero because it is checked on the line before.
Delete the duplicate check and pull the code in a tab.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/video/fbdev/omap/omapfb_main.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 106d21e74738..a8740213e891 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -846,12 +846,10 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
* be reenabled unless its size is > 0.
*/
if (old_size != size && size) {
- if (size) {
- memcpy(new_var, &fbi->var, sizeof(*new_var));
- r = set_fb_var(fbi, new_var);
- if (r < 0)
- goto out;
- }
+ memcpy(new_var, &fbi->var, sizeof(*new_var));
+ r = set_fb_var(fbi, new_var);
+ if (r < 0)
+ goto out;
}
if (fbdev->ctrl->sync)
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-08 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 20:00 [PATCH] fbdev: omapfb: remove duplicate check in omapfb_setup_mem() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox