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: Salym Senyonga <salymsash@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
{
struct oz_binding *binding;
- binding = kmalloc(sizeof(struct oz_binding), GFP_KERNEL);
+ binding = kzalloc(sizeof(struct oz_binding), GFP_KERNEL);
if (!binding)
return;
kfree(binding);
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);
spin_lock_bh(&g_binding_lock);