[PATCH] fbdev: pm3fb: Fix potential divide by zero
Alex Guo
alexguo1023 at gmail.com
Wed Jun 11 16:12:07 UTC 2025
Hi Greet,
Thanks for your confirmation and suggestions.
I added this patch based on existing checks on var->pixclock in other drivers, such as savagefb_check_var, nvidiafb_check_var, etc.
Are you suggesting that it is better to replace an invalid value (var->pixclock == 0) with a default valid value, instead of returning -EINVAL? If so, could you advise what a suitable default value would be for this case?
Actually, I have found a few similar issues in other functions as well. I would like to make sure I am addressing them in the correct way.
Best,
Alex
More information about the dri-devel
mailing list