* [PATCH v1 1/1] serial: 8250_dw: Drop unneeded NULL checks in dw8250_quirks()
@ 2025-02-03 12:14 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2025-02-03 12:14 UTC (permalink / raw)
To: Greg Kroah-Hartman, Andy Shevchenko, linux-kernel, linux-serial
Cc: Ilpo Järvinen, Jiri Slaby
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 <andriy.shevchenko@linux.intel.com>
---
drivers/tty/serial/8250/8250_dw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 6afcf27db3b8..ac3987513564 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;
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-03 12:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 12:14 [PATCH v1 1/1] serial: 8250_dw: Drop unneeded NULL checks in dw8250_quirks() Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®