summaryrefslogtreecommitdiff
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-01-22 14:55:20 +0300
committerJeff Garzik <jeff@garzik.org>2007-01-23 08:59:21 +0300
commit41b69c705152e93b3c6c872678dffd8a19b14d61 (patch)
tree1201123ed28a390af4eb6f5f90f7efeab58af617 /drivers/net/ehea
parentbb3a6449c18f6203e59195a98d633f5b5b57c133 (diff)
downloadlinux-41b69c705152e93b3c6c872678dffd8a19b14d61.tar.xz
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>
Diffstat (limited to 'drivers/net/ehea')
-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,
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;
}