Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176278
b: refs/heads/master
c: b9d52da
h: refs/heads/master
v: v3
  • Loading branch information
Alex Chiang authored and Linus Torvalds committed Dec 15, 2009
1 parent 2963530 commit ae48841
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: f8246f3159dfdf97b8b40f9e03e715bafedd22fc
refs/heads/master: b9d52dad9447d0db4b52d67d5e9e9d339b5e8302
18 changes: 12 additions & 6 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,18 @@ int register_cpu_under_node(unsigned int cpu, unsigned int nid)

int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
{
if (node_online(nid)) {
struct sys_device *obj = get_cpu_sysdev(cpu);
if (obj)
sysfs_remove_link(&node_devices[nid].sysdev.kobj,
kobject_name(&obj->kobj));
}
struct sys_device *obj;

if (!node_online(nid))
return 0;

obj = get_cpu_sysdev(cpu);
if (!obj)
return 0;

sysfs_remove_link(&node_devices[nid].sysdev.kobj,
kobject_name(&obj->kobj));

return 0;
}

Expand Down

0 comments on commit ae48841

Please sign in to comment.