Commit a5fe5659 authored by Yury Umanets's avatar Yury Umanets Committed by Linus Torvalds

[PATCH] memory allocation checks in eth1394_update()

Adds memory allocation checks in eth1394_update().
Signed-off-by: default avatarYury Umanets <torque@ukrpost.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3bdafaa1
......@@ -431,9 +431,12 @@ static int eth1394_update(struct unit_directory *ud)
if (!node)
return -ENOMEM;
node_info = kmalloc(sizeof(struct eth1394_node_info),
in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
if (!node_info) {
kfree(node);
return -ENOMEM;
}
spin_lock_init(&node_info->pdg.lock);
INIT_LIST_HEAD(&node_info->pdg.list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment