forked from Minki/linux
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:
parent
bb3a6449c1
commit
41b69c7051
@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter,
|
||||
int 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user