* Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> [231205 16:08]: > On Tue, Dec 05, 2023 at 09:32:36AM +0200, Tony Lindgren wrote: > > + name = kasprintf(GFP_KERNEL, "%s%i", serial8250_reg.dev_name, idx); > > No error check? Oops > > + ret = add_preferred_console_match(name, serial8250_reg.dev_name, idx); > > + if (!ret || ret == -ENOENT) > > + return; > > ret = serial_base_add_one_prefcon(...); > > ? Yup that should work even before struct device. Will fix the other places too you noticed. Thanks, Tony