Commit 41b69c70 authored by Thomas Klein's avatar Thomas Klein Committed by Jeff Garzik

ehea: Fixed possible nullpointer access

Fixed possible nullpointer access in event queue processing
Signed-off-by: default avatarThomas Klein <tklein@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent bb3a6449
...@@ -575,6 +575,7 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, ...@@ -575,6 +575,7 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter,
int i; int i;
for (i = 0; i < adapter->num_ports; i++) for (i = 0; i < adapter->num_ports; i++)
if (adapter->port[i])
if (adapter->port[i]->logical_port_id == logical_port) if (adapter->port[i]->logical_port_id == logical_port)
return adapter->port[i]; return adapter->port[i];
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment