[PATCH v8 01/11] serial: 8250_dw: allow port setup to report errors

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Nov 9 15:06:57 PST 2026


On Tue, Nov 10, 2026 at 01:05:28AM +0200, Andy Shevchenko wrote:
> On Thu, Nov 05, 2026 at 01:52:02PM -0700, James Hilliard wrote:
> > Return a status from dw8250_setup_port() and propagate failures through
> > the DW and LPSS probe paths before registering the UART. Use the existing
> > LPSS cleanup path to release board resources and IRQ vectors on failure.
> > 
> > Keep the current setup behavior by returning zero on both successful
> > paths. This separates error propagation from the configuration validation
> > that will use it.
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> after addressing below piece.

...

> > -	if (!data->skip_autocfg)
> > -		dw8250_setup_port(p);
> > +	if (!data->skip_autocfg) {
> > +		err = dw8250_setup_port(p);
> > +		if (err)
> > +			return err;
> > +	}
> 
> No, don't change it here, the return value will be simply ignored until the
> change that will make use of it.

Alternatively to minimize the churn do it like

	if (!data->skip_autocfg)
		err = dw8250_setup_port(p);
	if (err)
		return err;

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list