Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbXAVL4n (ORCPT ); Mon, 22 Jan 2007 06:56:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751740AbXAVL4n (ORCPT ); Mon, 22 Jan 2007 06:56:43 -0500 Received: from mtagate5.de.ibm.com ([195.212.29.154]:47879 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751698AbXAVL4m (ORCPT ); Mon, 22 Jan 2007 06:56:42 -0500 From: Thomas Klein Subject: [PATCH 2.6.20-rc5 7/7] ehea: Fixed possible nullpointer access Date: Mon, 22 Jan 2007 12:55:20 +0100 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Disposition: inline X-Length: 472 To: Jeff Garzik Cc: Christoph Raisch , "Jan-Bernd Themann" , "Jan-Bernd Themann" , "linux-kernel" , "linux-ppc" , Marcus Eder , netdev , Thomas Klein , Stefan Roscher , Stefan Roscher Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200701221255.20768.osstklei@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1088 Lines: 31 Fixed possible nullpointer access in event queue processing Signed-off-by: Thomas Klein --- drivers/net/ehea/ehea_main.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -Nurp -X dontdiff linux-2.6.20-rc5/drivers/net/ehea/ehea_main.c patched_kernel/drivers/net/ehea/ehea_main.c --- linux-2.6.20-rc5/drivers/net/ehea/ehea_main.c 2007-01-19 14:33:04.000000000 +0100 +++ patched_kernel/drivers/net/ehea/ehea_main.c 2007-01-19 14:36:05.000000000 +0100 @@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(s 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/