Commit c254a3d6 authored by Jorge Zapata's avatar Jorge Zapata

Removes a divizion by zero when the mode width is 0

parent a3bb2e4f
...@@ -1377,7 +1377,8 @@ static int davincifb_check_var(struct fb_var_screeninfo *var, ...@@ -1377,7 +1377,8 @@ static int davincifb_check_var(struct fb_var_screeninfo *var,
} }
else else
v.xres_virtual = v.xres; v.xres_virtual = v.xres;
v.yres_virtual = (w->fb_size / v.bits_per_pixel * 8) / v.xres_virtual; v.yres_virtual = (w->fb_size / v.bits_per_pixel * 8) /
(v.xres_virtual ? v.xres_virtual : 1);
if (v.yres_virtual < v.yres) if (v.yres_virtual < v.yres)
v.yres = v.yres_virtual; v.yres = v.yres_virtual;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment