Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero
From: Alex Guo
Date: Wed Jun 11 2025 - 12:12:44 EST
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