Skip to content

Commit

Permalink
ehea: Fixed possible nullpointer access
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Klein authored and Jeff Garzik committed Jan 23, 2007
1 parent bb3a644 commit 41b69c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 41b69c7

Please sign in to comment.