From: Thomas Klein Date: Mon, 22 Jan 2007 11:55:20 +0000 (+0100) Subject: ehea: Fixed possible nullpointer access X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=41b69c705152e93b3c6c872678dffd8a19b14d61;p=linux-beck.git ehea: Fixed possible nullpointer access Fixed possible nullpointer access in event queue processing Signed-off-by: Thomas Klein Signed-off-by: Jeff Garzik --- 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; }