diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-11-13 09:43:23 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 09:08:15 +0100 |
commit | ee0a29ba574bde9861eee08d7b13a9cfbfcc8d1f (patch) | |
tree | fbe76fa2fbb95f0f1f06fbc6c2cd0b36c12bc08f /drivers/tty/serial/suncore.c | |
parent | d491324f966518fbd3f4c627a3e9766d018a4eef (diff) |
serial-uartlite: fix null pointer dereference on pointer port
Pointer port is dereferenced on port->private_data when assigning pointer
pdata before port is null checked, leading to a potential null pointer
dereference. Fix this by assigning pdata after the null pointer check on
port.
Detected by CoverityScan, CID#1475434 ("Dereference before null check")
Fixes: 3b209d253e7f ("serial-uartlite: Do not use static struct uart_driver out of probe()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/suncore.c')
0 files changed, 0 insertions, 0 deletions