lkml.org 
[lkml]   [2021]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] serial: sifive: set pointer to NULL rather than 0.
Date
From: Colin Ian King <colin.king@canonical.com>

Clean up the assignment of sifive_serial_console_ports[ssp->port.line],
this is a pointer to a struct sifive_serial_port so the assignment
should be a NULL rather than a integer 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/tty/serial/sifive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 0ac0371f943b..b79900d0e91a 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -887,7 +887,7 @@ static void __ssp_add_console_port(struct sifive_serial_port *ssp)

static void __ssp_remove_console_port(struct sifive_serial_port *ssp)
{
- sifive_serial_console_ports[ssp->port.line] = 0;
+ sifive_serial_console_ports[ssp->port.line] = NULL;
}

#define SIFIVE_SERIAL_CONSOLE (&sifive_serial_console)
--
2.32.0
\
 
 \ /
  Last update: 2021-09-26 00:48    [W:0.029 / U:21.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site