diff options
author | Jiri Slaby (SUSE) <[email protected]> | 2024-08-05 12:20:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-08-07 13:13:35 +0200 |
commit | 602babaa84d627923713acaf5f7e9a4369e77473 (patch) | |
tree | f572c23f4416360a464bdd399c1495638c2bbfd6 /drivers/fpga/fpga-bridge.c | |
parent | 8173dbc18f7762de5b1a5a9960e09d303f766c4b (diff) |
serial: protect uart_port_dtr_rts() in uart_shutdown() too
Commit af224ca2df29 (serial: core: Prevent unsafe uart port access, part
3) added few uport == NULL checks. It added one to uart_shutdown(), so
the commit assumes, uport can be NULL in there. But right after that
protection, there is an unprotected "uart_port_dtr_rts(uport, false);"
call. That is invoked only if HUPCL is set, so I assume that is the
reason why we do not see lots of these reports.
Or it cannot be NULL at this point at all for some reason :P.
Until the above is investigated, stay on the safe side and move this
dereference to the if too.
I got this inconsistency from Coverity under CID 1585130. Thanks.
Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions