ehea: Fixed possible nullpointer access
Subsystems (2)
PATCH 7/7 ehea: Fixed possible nullpointer access
Fixed possible nullpointer access in event queue processing
Signed-off-by Thomas Klein <[email protected]>
---
drivers/net/ehea/ehea_main.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ehea/ehea_main.c +3 -2
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(sint i;for (i =0 ; i < adapter->num_ports; i++) -if (adapter->port[i]->logical_port_id == logical_port) -return adapter->port[i]; +if (adapter->port[i]) +if (adapter->port[i]->logical_port_id == logical_port) +return adapter->port[i];return NULL ; }