Commit e4b41af1 authored by Salym Senyonga's avatar Salym Senyonga Committed by Greg Kroah-Hartman

Staging: ozwpan: Change kmalloc() to kzalloc()

changing to kzalloc lets us get rid of some lines. The other concern
here is that some members of binding->ptype are still uninitialized at
the end of the function.
Signed-off-by: default avatarSalym Senyonga <salymsash@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a44755d8
...@@ -664,7 +664,7 @@ void oz_binding_add(const char *net_dev) ...@@ -664,7 +664,7 @@ void oz_binding_add(const char *net_dev)
{ {
struct oz_binding *binding; struct oz_binding *binding;
binding = kmalloc(sizeof(struct oz_binding), GFP_KERNEL); binding = kzalloc(sizeof(struct oz_binding), GFP_KERNEL);
if (!binding) if (!binding)
return; return;
...@@ -679,10 +679,6 @@ void oz_binding_add(const char *net_dev) ...@@ -679,10 +679,6 @@ void oz_binding_add(const char *net_dev)
kfree(binding); kfree(binding);
return; return;
} }
} else {
oz_dbg(ON, "Binding to all netcards\n");
memset(binding->name, 0, OZ_MAX_BINDING_LEN);
binding->ptype.dev = NULL;
} }
dev_add_pack(&binding->ptype); dev_add_pack(&binding->ptype);
spin_lock_bh(&g_binding_lock); spin_lock_bh(&g_binding_lock);
......
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