aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/oss/dmasound
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-14 00:33:16 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 08:09:54 -0800
commit3159f06dc2303630c02d1ad2eeaeaf341414c9df (patch)
tree678779f605dac635df3932381933b3950a0052ba /sound/oss/dmasound
parent[PATCH] remove many unneeded #includes of sched.h (diff)
downloadwireguard-linux-3159f06dc2303630c02d1ad2eeaeaf341414c9df.tar.xz
wireguard-linux-3159f06dc2303630c02d1ad2eeaeaf341414c9df.zip
[PATCH] OSS: replace kmalloc()+memset() combos with kzalloc()
Replace kmalloc() + memset() pairs with the appropriate kzalloc() calls. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r--sound/oss/dmasound/dac3550a.c3
-rw-r--r--sound/oss/dmasound/tas3001c.c3
-rw-r--r--sound/oss/dmasound/tas3004.c3
-rw-r--r--sound/oss/dmasound/tas_common.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c
index 7360d8954d60..0f0d03a55dab 100644
--- a/sound/oss/dmasound/dac3550a.c
+++ b/sound/oss/dmasound/dac3550a.c
@@ -163,10 +163,9 @@ static int daca_detect_client(struct i2c_adapter *adapter, int address)
struct i2c_client *new_client;
int rc = -ENODEV;
- new_client = kmalloc(sizeof(*new_client), GFP_KERNEL);
+ new_client = kzalloc(sizeof(*new_client), GFP_KERNEL);
if (!new_client)
return -ENOMEM;
- memset(new_client, 0, sizeof(*new_client));
new_client->addr = address;
new_client->adapter = adapter;
diff --git a/sound/oss/dmasound/tas3001c.c b/sound/oss/dmasound/tas3001c.c
index 2f21a3c00374..4b7dbdd2a438 100644
--- a/sound/oss/dmasound/tas3001c.c
+++ b/sound/oss/dmasound/tas3001c.c
@@ -807,10 +807,9 @@ tas3001c_init(struct i2c_client *client)
size_t sz = sizeof(*self) + (TAS3001C_REG_MAX*sizeof(tas_shadow_t));
int i, j;
- self = kmalloc(sz, GFP_KERNEL);
+ self = kzalloc(sz, GFP_KERNEL);
if (!self)
return -ENOMEM;
- memset(self, 0, sz);
self->super.client = client;
self->super.shadow = (tas_shadow_t *)(self+1);
diff --git a/sound/oss/dmasound/tas3004.c b/sound/oss/dmasound/tas3004.c
index af34fb39bc29..678bf0ff6da2 100644
--- a/sound/oss/dmasound/tas3004.c
+++ b/sound/oss/dmasound/tas3004.c
@@ -1092,10 +1092,9 @@ tas3004_init(struct i2c_client *client)
char mcr2 = 0;
int i, j;
- self = kmalloc(sz, GFP_KERNEL);
+ self = kzalloc(sz, GFP_KERNEL);
if (!self)
return -ENOMEM;
- memset(self, 0, sz);
self->super.client = client;
self->super.shadow = (tas_shadow_t *)(self+1);
diff --git a/sound/oss/dmasound/tas_common.c b/sound/oss/dmasound/tas_common.c
index 882ae98a41b1..665e85b5562b 100644
--- a/sound/oss/dmasound/tas_common.c
+++ b/sound/oss/dmasound/tas_common.c
@@ -135,10 +135,9 @@ tas_detect_client(struct i2c_adapter *adapter, int address)
return -ENODEV;
}
- new_client = kmalloc(sizeof(*new_client), GFP_KERNEL);
+ new_client = kzalloc(sizeof(*new_client), GFP_KERNEL);
if (!new_client)
return -ENOMEM;
- memset(new_client, 0, sizeof(*new_client));
new_client->addr = address;
new_client->adapter = adapter;