serial: 8250: dw: Fix NULL pointer dereference
dw8250_platform_data is only used on DT platforms for now. Fixes: 4a218b277fdb ("serial: 8250: dw: Create a generic platform data structure") Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220502115621.77985-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f26c65dacf
commit
e6a08c6949
@ -433,9 +433,9 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
|
||||
static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
|
||||
{
|
||||
struct device_node *np = p->dev->of_node;
|
||||
unsigned int quirks = data->pdata->quirks;
|
||||
|
||||
if (np) {
|
||||
unsigned int quirks = data->pdata->quirks;
|
||||
int id;
|
||||
|
||||
/* get index of serial line, if found in DT aliases */
|
||||
|
Loading…
x
Reference in New Issue
Block a user