diff options
author | Myles Watson <mylesgw@gmail.com> | 2010-06-10 04:06:52 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2010-06-10 04:06:52 +0000 |
commit | 1965a237124cc8e988cf760eb7e9a61efb2adabb (patch) | |
tree | 45d497612c62834b0578db869ed9d1ed6573bdcf | |
parent | 7a60c37c9346b9f9ba9aa623d10c052c6df5a5f7 (diff) | |
download | coreboot-1965a237124cc8e988cf760eb7e9a61efb2adabb.tar.xz |
Check for NULL before calling device_match()
It matters for multifunction devices who don't have siblings.
The error in the rumba device tree created that situation.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5628 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rwxr-xr-x | util/sconfig/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 83b1c7ce3c..4b6258fbf9 100755 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -348,7 +348,7 @@ static void pass1(FILE *fil, struct device *ptr) { fprintf(fil, "\t\t\t.dev = &%s,\n", d->name); if (d->children) fprintf(fil, "\t\t\t.children = &%s,\n", d->children->name); - if (device_match(d->next_sibling, ptr)) + if (d->next_sibling && device_match(d->next_sibling, ptr)) fprintf(fil, "\t\t\t.next=&%s_links[%d],\n", d->name, d->link+1); else fprintf(fil, "\t\t\t.next = NULL,\n"); |