From patchwork Tue Sep 16 00:23:22 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] Check for NULL return of prom_get_netinfo() From: Chandra Seetharaman X-Patchwork-Id: 22971 Message-Id: <20080916002322.21352.53127.sendpatchset@chandra-ubuntu> To: yaboot devel Date: Mon, 15 Sep 2008 17:23:22 -0700 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