From: Andy Shevchenko Date: Mon, 3 Feb 2025 12:14:56 +0000 (+0200) Subject: serial: 8250_dw: Drop unneeded NULL checks in dw8250_quirks() X-Git-Tag: v6.15-rc1~47^2~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfd3d4a40f3905ec70b17dbfa9b78764e59e4b4f;p=thirdparty%2Fkernel%2Flinux.git serial: 8250_dw: Drop unneeded NULL checks in dw8250_quirks() Since platform data is being provided for all supported hardware, no need to NULL check for it. Drop unneeded checks. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250203121456.3182891-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 6afcf27db3b88..ac39875135640 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -459,8 +459,8 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p) static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) { - unsigned int quirks = data->pdata ? data->pdata->quirks : 0; - u32 cpr_value = data->pdata ? data->pdata->cpr_value : 0; + unsigned int quirks = data->pdata->quirks; + u32 cpr_value = data->pdata->cpr_value; if (quirks & DW_UART_QUIRK_CPR_VALUE) data->data.cpr_value = cpr_value;