Skip to content
Commit ee0a29ba authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: 3b209d25 ("serial-uartlite: Do not use static struct uart_driver out of probe()")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d491324f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment