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>

authored by Thomas Klein and committed by Jeff Garzik 41b69c70 bb3a6449

+3 -2
+3 -2
drivers/net/ehea/ehea_main.c
··· 575 575 int i; 576 576 577 577 for (i = 0; i < adapter->num_ports; i++) 578 - if (adapter->port[i]->logical_port_id == logical_port) 579 - return adapter->port[i]; 578 + if (adapter->port[i]) 579 + if (adapter->port[i]->logical_port_id == logical_port) 580 + return adapter->port[i]; 580 581 return NULL; 581 582 } 582 583