提交 41b69c70 编写于 作者: T Thomas Klein 提交者: Jeff Garzik

ehea: Fixed possible nullpointer access

Fixed possible nullpointer access in event queue processing
Signed-off-by: NThomas Klein <tklein@de.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 bb3a6449
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册