diff options
| author | 2026-09-01 12:15:17 +0800 | |
|---|---|---|
| committer | 2026-09-23 14:44:45 +0200 | |
| commit | 27ca9a81485f179aac83d25fcc3234bc927fa17a (patch) | |
| tree | 7957809cff8672991f943d8791311def2ce63c69 /scripts/Makefile.thinlto | |
| parent | serial: qcom-geni: Avoid double-free of PM domain list (diff) | |
serial: 8250_mxpcie: set the driver data before registering ports
mxpcie8250_rs485_config() looks the board up with dev_get_drvdata() on
the PCI device, but pci_set_drvdata() only runs after the registration
loop. Where mxpcie8250_setup_port() presets rs485.flags to
SER_RS485_ENABLED and the flag survives uart_get_rs485_mode() - the
device has no firmware node, or its node sets
linux,rs485-enabled-at-boot-time - uart_configure_port() calls
->rs485_config() from inside serial8250_register_8250_port(), and the
callback dereferences a NULL board pointer.
Publish the driver data before the first port is registered.
Fixes: d21a1509c623 ("serial: 8250_mxpcie: support serial interface mode switching")
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Crescent Hsieh <crescentcy.hsieh@moxa.com>
Link: https://patch.msgid.link/20260901041519.114737-2-lilinmao@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
