Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196601
b: refs/heads/master
c: 43caa61
h: refs/heads/master
i:
  196599: 1850b60
v: v3
  • Loading branch information
Julia Lawall authored and Benjamin Herrenschmidt committed Apr 7, 2010
1 parent 0e4e93f commit 5a996ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7df5c5e52a545774c4db1f2adf09ede018ab139
refs/heads/master: 43caa61f154da85a620965f3f61c2f45366d8dc7
7 changes: 2 additions & 5 deletions trunk/arch/powerpc/platforms/pseries/dlpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa)
* prepend this to the full_name.
*/
name = (char *)ccwa + ccwa->name_offset;
dn->full_name = kmalloc(strlen(name) + 2, GFP_KERNEL);
dn->full_name = kasprintf(GFP_KERNEL, "/%s", name);
if (!dn->full_name) {
kfree(dn);
return NULL;
}

sprintf(dn->full_name, "/%s", name);
return dn;
}

Expand Down Expand Up @@ -410,15 +409,13 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
* directory of the device tree. CPUs actually live in the
* cpus directory so we need to fixup the full_name.
*/
cpu_name = kzalloc(strlen(dn->full_name) + strlen("/cpus") + 1,
GFP_KERNEL);
cpu_name = kasprintf(GFP_KERNEL, "/cpus%s", dn->full_name);
if (!cpu_name) {
dlpar_free_cc_nodes(dn);
rc = -ENOMEM;
goto out;
}

sprintf(cpu_name, "/cpus%s", dn->full_name);
kfree(dn->full_name);
dn->full_name = cpu_name;

Expand Down

0 comments on commit 5a996ac

Please sign in to comment.