[PATCH 2/2] Check for NULL return of prom_get_netinfo()
Chandra Seetharaman
sekharan at us.ibm.com
Tue Sep 16 10:23:22 EST 2008
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 <sekharan at us.ibm.com>
---
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
More information about the Yaboot-devel
mailing list