summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-01-22 12:55:20 +0100
committerJeff Garzik <jeff@garzik.org>2007-01-23 00:59:21 -0500
commit41b69c705152e93b3c6c872678dffd8a19b14d61 (patch)
tree1201123ed28a390af4eb6f5f90f7efeab58af617
parentbb3a6449c18f6203e59195a98d633f5b5b57c133 (diff)
downloadop-kernel-dev-41b69c705152e93b3c6c872678dffd8a19b14d61.zip
op-kernel-dev-41b69c705152e93b3c6c872678dffd8a19b14d61.tar.gz
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 22c81ae..1072e69 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,
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;
}
OpenPOWER on IntegriCloud