Thanks for the review comments and apologies that I took so long to
respond. I put it as a safeguard check before it wreaks havoc. I
honestly see no harm, its a minimal change that verfies the args.

Please suggest if you have alternate ideas. I would be happy to
explore and send a revised patch if there is a better way.

On Thu 23 Jul 04:00 PM, Fabio Estevam wrote:
> Hi Naveen,
> 
> On Sun, Jun 7, 2026 at 4:53 PM Naveen Kumar Chaudhary
> <[email protected]> wrote:
> >
> > _lpuart_serial_setbrg(), _lpuart32_serial_setbrg_7ulp(), and
> > _lpuart32_serial_setbrg() all divide by baudrate without validating
> > it first. If baudrate is zero due to misconfiguration or an
> > uninitialized value, this can cause a division-by-zero.
> >
> > As a safety measure, add an early return when baudrate is zero in
> > all three functions.
> 
> This looks like a theoretical problem. I'm not convinced this is the
> proper solution.
> 
> Thanks

Reply via email to