From patchwork Tue Sep 16 00:23:22 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandra Seetharaman X-Patchwork-Id: 22971 Return-Path: X-Original-To: yaboot-devel@ozlabs.org Delivered-To: yaboot-devel@ozlabs.org Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e32.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 2BB1BDDDF5 for ; Tue, 16 Sep 2008 10:24:04 +1000 (EST) Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m8G0GITV000951 for ; Mon, 15 Sep 2008 20:16:18 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m8G0O17F210714 for ; Mon, 15 Sep 2008 18:24:01 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m8G6O0Jh026454 for ; Tue, 16 Sep 2008 00:24:01 -0600 Received: from [127.0.1.1] (chandra-ubuntu.beaverton.ibm.com [9.47.17.98]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m8G6O020026420; Tue, 16 Sep 2008 00:24:00 -0600 From: Chandra Seetharaman To: yaboot devel Date: Mon, 15 Sep 2008 17:23:22 -0700 Message-Id: <20080916002322.21352.53127.sendpatchset@chandra-ubuntu> In-Reply-To: <20080916002310.21352.48207.sendpatchset@chandra-ubuntu> References: <20080916002310.21352.48207.sendpatchset@chandra-ubuntu> Subject: [PATCH 2/2] Check for NULL return of prom_get_netinfo() X-BeenThere: yaboot-devel@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Technical and development discussion regarding yaboot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 00:24:05 -0000 Check the return value of prom_get_netinfo() and return failure if NULL. Not returning here leads to a wierd failure. Signed-off-by: Chandra Seetharaman --- second/yaboot.c | 2 ++ 1 file changed, 2 insertions(+) Index: yaboot.git_head/second/yaboot.c =================================================================== --- yaboot.git_head.orig/second/yaboot.c +++ yaboot.git_head/second/yaboot.c @@ -470,6 +470,8 @@ static int load_my_config_file(struct bo int minlen; packet = prom_get_netinfo(); + if (!packet) + return rc; /* * First, try to match on mac address with the hardware type