summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ozwpan/ozproto.c
diff options
context:
space:
mode:
authorSalym Senyonga2014-01-25 10:54:41 +0100
committerGreg Kroah-Hartman2014-02-07 19:59:38 +0100
commite4b41af14d7dc683ecd84a10fed8ea38b94f0f28 (patch)
tree6fa4af9dfe99d59ed021f12dce712c34fe65e976 /drivers/staging/ozwpan/ozproto.c
parentStaging: ozwpan: reduce indent levels in oz_binding_add(). (diff)
downloadkernel-qcow2-linux-e4b41af14d7dc683ecd84a10fed8ea38b94f0f28.tar.gz
kernel-qcow2-linux-e4b41af14d7dc683ecd84a10fed8ea38b94f0f28.tar.xz
kernel-qcow2-linux-e4b41af14d7dc683ecd84a10fed8ea38b94f0f28.zip
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: Salym Senyonga <salymsash@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozproto.c')
-rw-r--r--drivers/staging/ozwpan/ozproto.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index c303ae144083..e7138ed325dd 100644
--- a/drivers/staging/ozwpan/ozproto.c
+++ b/drivers/staging/ozwpan/ozproto.c
@@ -664,7 +664,7 @@ void oz_binding_add(const char *net_dev)
{
struct oz_binding *binding;
- binding = kmalloc(sizeof(struct oz_binding), GFP_KERNEL);
+ binding = kzalloc(sizeof(struct oz_binding), GFP_KERNEL);
if (!binding)
return;
@@ -679,10 +679,6 @@ void oz_binding_add(const char *net_dev)
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);