diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-09-09 08:20:23 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 04:47:59 -0400 |
commit | ca2c0966562cfbf9273167a5b60e8fddc24078d6 (patch) | |
tree | 0292047f4cd0a24e1b24914081ebe890bb535877 /sound/core/info.c | |
parent | 8648811f1db85eeacb821591ef11a2c229c29aa0 (diff) |
[ALSA] Replace with kzalloc() - core stuff
Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel
Timer Midlevel,ALSA<-OSS emulation
Replace kcalloc(1,..) with kzalloc().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 7f8bdf7b0058..37024d68a26e 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -295,7 +295,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
295 | goto __error; | 295 | goto __error; |
296 | } | 296 | } |
297 | } | 297 | } |
298 | data = kcalloc(1, sizeof(*data), GFP_KERNEL); | 298 | data = kzalloc(sizeof(*data), GFP_KERNEL); |
299 | if (data == NULL) { | 299 | if (data == NULL) { |
300 | err = -ENOMEM; | 300 | err = -ENOMEM; |
301 | goto __error; | 301 | goto __error; |
@@ -304,7 +304,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
304 | switch (entry->content) { | 304 | switch (entry->content) { |
305 | case SNDRV_INFO_CONTENT_TEXT: | 305 | case SNDRV_INFO_CONTENT_TEXT: |
306 | if (mode == O_RDONLY || mode == O_RDWR) { | 306 | if (mode == O_RDONLY || mode == O_RDWR) { |
307 | buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); | 307 | buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); |
308 | if (buffer == NULL) { | 308 | if (buffer == NULL) { |
309 | kfree(data); | 309 | kfree(data); |
310 | err = -ENOMEM; | 310 | err = -ENOMEM; |
@@ -323,7 +323,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
323 | data->rbuffer = buffer; | 323 | data->rbuffer = buffer; |
324 | } | 324 | } |
325 | if (mode == O_WRONLY || mode == O_RDWR) { | 325 | if (mode == O_WRONLY || mode == O_RDWR) { |
326 | buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); | 326 | buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); |
327 | if (buffer == NULL) { | 327 | if (buffer == NULL) { |
328 | if (mode == O_RDWR) { | 328 | if (mode == O_RDWR) { |
329 | vfree(data->rbuffer->buffer); | 329 | vfree(data->rbuffer->buffer); |
@@ -752,7 +752,7 @@ char *snd_info_get_str(char *dest, char *src, int len) | |||
752 | static snd_info_entry_t *snd_info_create_entry(const char *name) | 752 | static snd_info_entry_t *snd_info_create_entry(const char *name) |
753 | { | 753 | { |
754 | snd_info_entry_t *entry; | 754 | snd_info_entry_t *entry; |
755 | entry = kcalloc(1, sizeof(*entry), GFP_KERNEL); | 755 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); |
756 | if (entry == NULL) | 756 | if (entry == NULL) |
757 | return NULL; | 757 | return NULL; |
758 | entry->name = kstrdup(name, GFP_KERNEL); | 758 | entry->name = kstrdup(name, GFP_KERNEL); |