diff options
author | Julia Lawall <julia@diku.dk> | 2009-12-19 02:18:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-19 03:40:26 -0500 |
commit | ef86f581f7e8b29cb58d7f4e892e1a91b3805124 (patch) | |
tree | ef8e68bc136b24f6fd0bfee26b45f653123d38d9 /sound | |
parent | d6a89fefa50feda5516cd5210ad0008a44632b52 (diff) |
ALSA: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/msnd/msnd_midi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/isa/msnd/msnd_midi.c b/sound/isa/msnd/msnd_midi.c index cb9aa4c4edd0..4be562b2cf21 100644 --- a/sound/isa/msnd/msnd_midi.c +++ b/sound/isa/msnd/msnd_midi.c | |||
@@ -162,7 +162,7 @@ int snd_msndmidi_new(struct snd_card *card, int device) | |||
162 | err = snd_rawmidi_new(card, "MSND-MIDI", device, 1, 1, &rmidi); | 162 | err = snd_rawmidi_new(card, "MSND-MIDI", device, 1, 1, &rmidi); |
163 | if (err < 0) | 163 | if (err < 0) |
164 | return err; | 164 | return err; |
165 | mpu = kcalloc(1, sizeof(*mpu), GFP_KERNEL); | 165 | mpu = kzalloc(sizeof(*mpu), GFP_KERNEL); |
166 | if (mpu == NULL) { | 166 | if (mpu == NULL) { |
167 | snd_device_free(card, rmidi); | 167 | snd_device_free(card, rmidi); |
168 | return -ENOMEM; | 168 | return -ENOMEM; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index aeed4cc5aa79..20c1828e4bac 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -12857,7 +12857,7 @@ static int patch_alc268(struct hda_codec *codec) | |||
12857 | int board_config; | 12857 | int board_config; |
12858 | int i, has_beep, err; | 12858 | int i, has_beep, err; |
12859 | 12859 | ||
12860 | spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); | 12860 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
12861 | if (spec == NULL) | 12861 | if (spec == NULL) |
12862 | return -ENOMEM; | 12862 | return -ENOMEM; |
12863 | 12863 | ||