summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2022-05-02 14:56:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-05 22:33:36 +0200
commite6a08c6949cba95e261ce11cd4648ea3d96bd2f1 (patch)
tree3d8c8de969f49858bfac049bcf719cc9e5fddf3b /drivers/tty
parentf26c65dacfc2a9a0da07220972727de48534b646 (diff)
downloadlinux-e6a08c6949cba95e261ce11cd4648ea3d96bd2f1.tar.gz
linux-e6a08c6949cba95e261ce11cd4648ea3d96bd2f1.tar.bz2
linux-e6a08c6949cba95e261ce11cd4648ea3d96bd2f1.zip
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 0cf1a99dc124..31422e44c64f 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -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 */