]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ehea: Fixed possible nullpointer access
authorThomas Klein <osstklei@de.ibm.com>
Mon, 22 Jan 2007 11:55:20 +0000 (12:55 +0100)
committerJeff Garzik <jeff@garzik.org>
Tue, 23 Jan 2007 05:59:21 +0000 (00:59 -0500)
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>
drivers/net/ehea/ehea_main.c

index 22c81ae4f9adcaeeafe25b1cb2e53e629d69ce1a..1072e69ef85de679c9ac4517a3b8a3f05d34636c 100644 (file)
@@ -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;
 }