Re: [PATCH v2 tty-next 1/3] 8250: microchip: pci1xxxx: Add driver for quad-uart support.

From: Tharunkumar.Pasumarthi
Date: Wed Oct 26 2022 - 07:12:47 EST


On Mon, 2022-10-03 at 21:36 +0200, Christophe JAILLET wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> > +             }
> > +             priv->line[i] = serial8250_register_8250_port(&uart);
>
> In case of error, this should be undone in an error handling path in the
> probe, as done in the remove() function below.
>
> If we break, we still continue and return success. But the last
> priv->line[i] are still 0. Is it an issue when pci1xxxx_serial_remove()
> is called?

This will not cause a problem in pci1xxxx_serial_remove as this condition 'priv-
>line[i] >= 0' will be checked for each of the ports before calling
serial8250_unregister_port API.


Thanks,
Tharun Kumar P