Re: [PATCH v2 3/3] xen/arm: handle irq_set_type() failures
Mykola Kvach <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.devel |
|---|---|
| Message-ID | <w5cozmwr5bh2iugoslfjwxhhqlijbfcmrh2rgiu7acspysitl6@umdjbcatzf2o> |
Hi Jan, Thank you for the review. On Wed, Aug 12, 2026 at 09:39:55AM +0200, Jan Beulich wrote: > On 10.08.2026 20:38, Mykola Kvach wrote: > > --- a/xen/drivers/char/ns16550.c > > +++ b/xen/drivers/char/ns16550.c > > @@ -1928,6 +1928,7 @@ static int __init ns16550_acpi_uart_init(const void *data) > > struct acpi_table_header *table; > > struct acpi_table_spcr *spcr; > > acpi_status status; > > + int rc; > > /* > > * Same as the DT part. > > * Only support one UART on ARM which happen to be ns16550_com[0]. > > @@ -1976,7 +1977,9 @@ static int __init ns16550_acpi_uart_init(const void *data) > > uart->reg_width = spcr->serial_port.access_width; > > > > /* The trigger/polarity information is not available in spcr. */ > > - irq_set_type(spcr->interrupt, IRQ_TYPE_LEVEL_HIGH); > > + rc = irq_set_type(spcr->interrupt, IRQ_TYPE_LEVEL_HIGH); > > + if ( rc ) > > + return rc; > > Is erroring out still appropriate when part of ns16550_com[] was already > modified? I.e. doesn't the call need to move up then? Good point. Returning there can leave ns16550_com[0] partially initialized. I'll move irq_set_type() before ns16550_init_common() and before modifying the UART state. Best regards, Mykola