ehea: Fixed possible nullpointer access

Fixed possible nullpointer access in event queue processing

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Thomas Klein 2007-01-22 12:55:20 +01:00 committed by Jeff Garzik
parent bb3a6449c1
commit 41b69c7051

View File

@ -575,8 +575,9 @@ 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]->logical_port_id == logical_port) if (adapter->port[i])
return adapter->port[i]; if (adapter->port[i]->logical_port_id == logical_port)
return adapter->port[i];
return NULL; return NULL;
} }