aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-01-22 06:55:20 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-23 00:59:21 -0500
commit41b69c705152e93b3c6c872678dffd8a19b14d61 (patch)
tree1201123ed28a390af4eb6f5f90f7efeab58af617
parentbb3a6449c18f6203e59195a98d633f5b5b57c133 (diff)
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>
-rw-r--r--drivers/net/ehea/ehea_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 22c81ae4f9ad..1072e69ef85d 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter,
575 int i; 575 int i;
576 576
577 for (i = 0; i < adapter->num_ports; i++) 577 for (i = 0; i < adapter->num_ports; i++)
578 if (adapter->port[i]->logical_port_id == logical_port) 578 if (adapter->port[i])
579 return adapter->port[i]; 579 if (adapter->port[i]->logical_port_id == logical_port)
580 return adapter->port[i];
580 return NULL; 581 return NULL;
581} 582}
582 583