提交 e560d8d8 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] Replace with kzalloc() - pci stuff

AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 9e76a76e
...@@ -1797,7 +1797,7 @@ int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, ...@@ -1797,7 +1797,7 @@ int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops,
snd_assert(card != NULL, return -EINVAL); snd_assert(card != NULL, return -EINVAL);
snd_assert(rbus != NULL, return -EINVAL); snd_assert(rbus != NULL, return -EINVAL);
bus = kcalloc(1, sizeof(*bus), GFP_KERNEL); bus = kzalloc(sizeof(*bus), GFP_KERNEL);
if (bus == NULL) if (bus == NULL)
return -ENOMEM; return -ENOMEM;
bus->card = card; bus->card = card;
...@@ -1906,7 +1906,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97) ...@@ -1906,7 +1906,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
} }
card = bus->card; card = bus->card;
ac97 = kcalloc(1, sizeof(*ac97), GFP_KERNEL); ac97 = kzalloc(sizeof(*ac97), GFP_KERNEL);
if (ac97 == NULL) if (ac97 == NULL)
return -ENOMEM; return -ENOMEM;
ac97->private_data = template->private_data; ac97->private_data = template->private_data;
......
...@@ -357,7 +357,7 @@ int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531) ...@@ -357,7 +357,7 @@ int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531)
snd_assert(rak4531 != NULL, return -EINVAL); snd_assert(rak4531 != NULL, return -EINVAL);
*rak4531 = NULL; *rak4531 = NULL;
snd_assert(card != NULL && _ak4531 != NULL, return -EINVAL); snd_assert(card != NULL && _ak4531 != NULL, return -EINVAL);
ak4531 = kcalloc(1, sizeof(*ak4531), GFP_KERNEL); ak4531 = kzalloc(sizeof(*ak4531), GFP_KERNEL);
if (ak4531 == NULL) if (ak4531 == NULL)
return -ENOMEM; return -ENOMEM;
*ak4531 = *_ak4531; *ak4531 = *_ak4531;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "ad1889.h" #include "ad1889.h"
#include "ac97/ac97_id.h" #include "ac97/ac97_id.h"
#define AD1889_DRVVER "$Revision: 1.1 $" #define AD1889_DRVVER "$Revision: 1.2 $"
MODULE_AUTHOR("Kyle McMartin <kyle@parisc-linux.org>, Thibaut Varene <t-bone@parisc-linux.org>"); MODULE_AUTHOR("Kyle McMartin <kyle@parisc-linux.org>, Thibaut Varene <t-bone@parisc-linux.org>");
MODULE_DESCRIPTION("Analog Devices AD1889 ALSA sound driver"); MODULE_DESCRIPTION("Analog Devices AD1889 ALSA sound driver");
...@@ -928,7 +928,7 @@ snd_ad1889_create(snd_card_t *card, ...@@ -928,7 +928,7 @@ snd_ad1889_create(snd_card_t *card,
} }
/* allocate chip specific data with zero-filled memory */ /* allocate chip specific data with zero-filled memory */
if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) { if ((chip = kzalloc(sizeof(*chip), GFP_KERNEL)) == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -1531,7 +1531,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card, ...@@ -1531,7 +1531,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1208,7 +1208,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card, ...@@ -1208,7 +1208,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -156,7 +156,7 @@ snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip) ...@@ -156,7 +156,7 @@ snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip)
} }
pci_set_dma_mask(pci, VORTEX_DMA_MASK); pci_set_dma_mask(pci, VORTEX_DMA_MASK);
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) if (chip == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -1345,7 +1345,7 @@ static int __devinit snd_azf3328_create(snd_card_t * card, ...@@ -1345,7 +1345,7 @@ static int __devinit snd_azf3328_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -710,7 +710,7 @@ static int __devinit snd_bt87x_create(snd_card_t *card, ...@@ -710,7 +710,7 @@ static int __devinit snd_bt87x_create(snd_card_t *card,
if (err < 0) if (err < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (!chip) { if (!chip) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -352,7 +352,7 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, ...@@ -352,7 +352,7 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream,
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int err; int err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -419,7 +419,7 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i ...@@ -419,7 +419,7 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int err; int err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) { if (epcm == NULL) {
snd_printk("open_capture_channel: failed epcm alloc\n"); snd_printk("open_capture_channel: failed epcm alloc\n");
return -ENOMEM; return -ENOMEM;
...@@ -1144,7 +1144,7 @@ static int __devinit snd_ca0106_create(snd_card_t *card, ...@@ -1144,7 +1144,7 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
return -ENXIO; return -ENXIO;
} }
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2775,7 +2775,7 @@ static int __devinit snd_cmipci_create(snd_card_t *card, struct pci_dev *pci, ...@@ -2775,7 +2775,7 @@ static int __devinit snd_cmipci_create(snd_card_t *card, struct pci_dev *pci,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
cm = kcalloc(1, sizeof(*cm), GFP_KERNEL); cm = kzalloc(sizeof(*cm), GFP_KERNEL);
if (cm == NULL) { if (cm == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1383,7 +1383,7 @@ static int __devinit snd_cs4281_create(snd_card_t * card, ...@@ -1383,7 +1383,7 @@ static int __devinit snd_cs4281_create(snd_card_t * card,
*rchip = NULL; *rchip = NULL;
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1304,7 +1304,7 @@ static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pc ...@@ -1304,7 +1304,7 @@ static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pc
cs46xx_pcm_t * cpcm; cs46xx_pcm_t * cpcm;
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
cpcm = kcalloc(1, sizeof(*cpcm), GFP_KERNEL); cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL);
if (cpcm == NULL) if (cpcm == NULL)
return -ENOMEM; return -ENOMEM;
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
...@@ -3774,7 +3774,7 @@ int __devinit snd_cs46xx_create(snd_card_t * card, ...@@ -3774,7 +3774,7 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -865,7 +865,7 @@ int __devinit snd_emu10k1_create(snd_card_t * card, ...@@ -865,7 +865,7 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
emu = kcalloc(1, sizeof(*emu), GFP_KERNEL); emu = kzalloc(sizeof(*emu), GFP_KERNEL);
if (emu == NULL) { if (emu == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -395,7 +395,7 @@ static int snd_emu10k1x_playback_open(snd_pcm_substream_t *substream) ...@@ -395,7 +395,7 @@ static int snd_emu10k1x_playback_open(snd_pcm_substream_t *substream)
if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
return err; return err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = chip; epcm->emu = chip;
...@@ -571,7 +571,7 @@ static int snd_emu10k1x_pcm_open_capture(snd_pcm_substream_t *substream) ...@@ -571,7 +571,7 @@ static int snd_emu10k1x_pcm_open_capture(snd_pcm_substream_t *substream)
if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
return err; return err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -920,7 +920,7 @@ static int __devinit snd_emu10k1x_create(snd_card_t *card, ...@@ -920,7 +920,7 @@ static int __devinit snd_emu10k1x_create(snd_card_t *card,
return -ENXIO; return -ENXIO;
} }
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1036,7 +1036,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu) ...@@ -1036,7 +1036,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
spin_lock_init(&emu->fx8010.irq_lock); spin_lock_init(&emu->fx8010.irq_lock);
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL || if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
(icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL || (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) { (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
err = -ENOMEM; err = -ENOMEM;
...@@ -1503,11 +1503,11 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) ...@@ -1503,11 +1503,11 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
spin_lock_init(&emu->fx8010.irq_lock); spin_lock_init(&emu->fx8010.irq_lock);
INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL) if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
return -ENOMEM; return -ENOMEM;
if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL || if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL || (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
(ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) { (ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) {
err = -ENOMEM; err = -ENOMEM;
goto __err; goto __err;
} }
...@@ -2217,7 +2217,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne ...@@ -2217,7 +2217,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
kfree(ipcm); kfree(ipcm);
return res; return res;
case SNDRV_EMU10K1_IOCTL_PCM_PEEK: case SNDRV_EMU10K1_IOCTL_PCM_PEEK:
ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL); ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL);
if (ipcm == NULL) if (ipcm == NULL)
return -ENOMEM; return -ENOMEM;
if (copy_from_user(ipcm, argp, sizeof(*ipcm))) { if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
......
...@@ -1016,7 +1016,7 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream) ...@@ -1016,7 +1016,7 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int i; int i;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = emu; epcm->emu = emu;
...@@ -1049,7 +1049,7 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) ...@@ -1049,7 +1049,7 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int i, err; int i, err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = emu; epcm->emu = emu;
...@@ -1094,7 +1094,7 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream) ...@@ -1094,7 +1094,7 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
emu10k1_pcm_t *epcm; emu10k1_pcm_t *epcm;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = emu; epcm->emu = emu;
...@@ -1130,7 +1130,7 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream) ...@@ -1130,7 +1130,7 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
emu10k1_pcm_t *epcm; emu10k1_pcm_t *epcm;
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = emu; epcm->emu = emu;
...@@ -1170,7 +1170,7 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream) ...@@ -1170,7 +1170,7 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
int nefx = emu->audigy ? 64 : 32; int nefx = emu->audigy ? 64 : 32;
int idx; int idx;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
if (epcm == NULL) if (epcm == NULL)
return -ENOMEM; return -ENOMEM;
epcm->emu = emu; epcm->emu = emu;
......
...@@ -178,7 +178,7 @@ static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, in ...@@ -178,7 +178,7 @@ static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, in
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int err; int err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
//snd_printk("epcm kcalloc: %p\n", epcm); //snd_printk("epcm kcalloc: %p\n", epcm);
if (epcm == NULL) if (epcm == NULL)
...@@ -214,7 +214,7 @@ static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int ...@@ -214,7 +214,7 @@ static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
int err; int err;
epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
//snd_printk("epcm kcalloc: %p\n", epcm); //snd_printk("epcm kcalloc: %p\n", epcm);
if (epcm == NULL) if (epcm == NULL)
......
...@@ -1943,7 +1943,7 @@ static int __devinit snd_ensoniq_create(snd_card_t * card, ...@@ -1943,7 +1943,7 @@ static int __devinit snd_ensoniq_create(snd_card_t * card,
*rensoniq = NULL; *rensoniq = NULL;
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
ensoniq = kcalloc(1, sizeof(*ensoniq), GFP_KERNEL); ensoniq = kzalloc(sizeof(*ensoniq), GFP_KERNEL);
if (ensoniq == NULL) { if (ensoniq == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1494,7 +1494,7 @@ static int __devinit snd_es1938_create(snd_card_t * card, ...@@ -1494,7 +1494,7 @@ static int __devinit snd_es1938_create(snd_card_t * card,
return -ENXIO; return -ENXIO;
} }
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1577,7 +1577,7 @@ static int snd_es1968_playback_open(snd_pcm_substream_t *substream) ...@@ -1577,7 +1577,7 @@ static int snd_es1968_playback_open(snd_pcm_substream_t *substream)
if (apu1 < 0) if (apu1 < 0)
return apu1; return apu1;
es = kcalloc(1, sizeof(*es), GFP_KERNEL); es = kzalloc(sizeof(*es), GFP_KERNEL);
if (!es) { if (!es) {
snd_es1968_free_apu_pair(chip, apu1); snd_es1968_free_apu_pair(chip, apu1);
return -ENOMEM; return -ENOMEM;
...@@ -1622,7 +1622,7 @@ static int snd_es1968_capture_open(snd_pcm_substream_t *substream) ...@@ -1622,7 +1622,7 @@ static int snd_es1968_capture_open(snd_pcm_substream_t *substream)
return apu2; return apu2;
} }
es = kcalloc(1, sizeof(*es), GFP_KERNEL); es = kzalloc(sizeof(*es), GFP_KERNEL);
if (!es) { if (!es) {
snd_es1968_free_apu_pair(chip, apu1); snd_es1968_free_apu_pair(chip, apu1);
snd_es1968_free_apu_pair(chip, apu2); snd_es1968_free_apu_pair(chip, apu2);
...@@ -2569,7 +2569,7 @@ static int __devinit snd_es1968_create(snd_card_t * card, ...@@ -2569,7 +2569,7 @@ static int __devinit snd_es1968_create(snd_card_t * card,
return -ENXIO; return -ENXIO;
} }
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (! chip) { if (! chip) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(snd_card_t * card, ...@@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(snd_card_t * card,
*rchip = NULL; *rchip = NULL;
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -288,7 +288,7 @@ static int init_unsol_queue(struct hda_bus *bus) ...@@ -288,7 +288,7 @@ static int init_unsol_queue(struct hda_bus *bus)
{ {
struct hda_bus_unsolicited *unsol; struct hda_bus_unsolicited *unsol;
unsol = kcalloc(1, sizeof(*unsol), GFP_KERNEL); unsol = kzalloc(sizeof(*unsol), GFP_KERNEL);
if (! unsol) { if (! unsol) {
snd_printk(KERN_ERR "hda_codec: can't allocate unsolicited queue\n"); snd_printk(KERN_ERR "hda_codec: can't allocate unsolicited queue\n");
return -ENOMEM; return -ENOMEM;
...@@ -358,7 +358,7 @@ int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp, ...@@ -358,7 +358,7 @@ int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp,
if (busp) if (busp)
*busp = NULL; *busp = NULL;
bus = kcalloc(1, sizeof(*bus), GFP_KERNEL); bus = kzalloc(sizeof(*bus), GFP_KERNEL);
if (bus == NULL) { if (bus == NULL) {
snd_printk(KERN_ERR "can't allocate struct hda_bus\n"); snd_printk(KERN_ERR "can't allocate struct hda_bus\n");
return -ENOMEM; return -ENOMEM;
...@@ -493,7 +493,7 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, ...@@ -493,7 +493,7 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
return -EBUSY; return -EBUSY;
} }
codec = kcalloc(1, sizeof(*codec), GFP_KERNEL); codec = kzalloc(sizeof(*codec), GFP_KERNEL);
if (codec == NULL) { if (codec == NULL) {
snd_printk(KERN_ERR "can't allocate struct hda_codec\n"); snd_printk(KERN_ERR "can't allocate struct hda_codec\n");
return -ENOMEM; return -ENOMEM;
......
...@@ -98,7 +98,7 @@ static int add_new_node(struct hda_codec *codec, struct hda_gspec *spec, hda_nid ...@@ -98,7 +98,7 @@ static int add_new_node(struct hda_codec *codec, struct hda_gspec *spec, hda_nid
struct hda_gnode *node; struct hda_gnode *node;
int nconns; int nconns;
node = kcalloc(1, sizeof(*node), GFP_KERNEL); node = kzalloc(sizeof(*node), GFP_KERNEL);
if (node == NULL) if (node == NULL)
return -ENOMEM; return -ENOMEM;
node->nid = nid; node->nid = nid;
...@@ -886,7 +886,7 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) ...@@ -886,7 +886,7 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec)
return -ENODEV; return -ENODEV;
} }
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) { if (spec == NULL) {
printk(KERN_ERR "hda_generic: can't allocate spec\n"); printk(KERN_ERR "hda_generic: can't allocate spec\n");
return -ENOMEM; return -ENOMEM;
......
...@@ -1402,7 +1402,7 @@ static int __devinit azx_create(snd_card_t *card, struct pci_dev *pci, ...@@ -1402,7 +1402,7 @@ static int __devinit azx_create(snd_card_t *card, struct pci_dev *pci,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (NULL == chip) { if (NULL == chip) {
snd_printk(KERN_ERR SFX "cannot allocate chip\n"); snd_printk(KERN_ERR SFX "cannot allocate chip\n");
......
...@@ -465,7 +465,7 @@ static int patch_ad1986a(struct hda_codec *codec) ...@@ -465,7 +465,7 @@ static int patch_ad1986a(struct hda_codec *codec)
{ {
struct ad198x_spec *spec; struct ad198x_spec *spec;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -623,7 +623,7 @@ static int patch_ad1983(struct hda_codec *codec) ...@@ -623,7 +623,7 @@ static int patch_ad1983(struct hda_codec *codec)
{ {
struct ad198x_spec *spec; struct ad198x_spec *spec;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -764,7 +764,7 @@ static int patch_ad1981(struct hda_codec *codec) ...@@ -764,7 +764,7 @@ static int patch_ad1981(struct hda_codec *codec)
{ {
struct ad198x_spec *spec; struct ad198x_spec *spec;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -667,7 +667,7 @@ static int patch_cmi9880(struct hda_codec *codec) ...@@ -667,7 +667,7 @@ static int patch_cmi9880(struct hda_codec *codec)
{ {
struct cmi_spec *spec; struct cmi_spec *spec;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -2095,7 +2095,7 @@ static int patch_alc880(struct hda_codec *codec) ...@@ -2095,7 +2095,7 @@ static int patch_alc880(struct hda_codec *codec)
int board_config; int board_config;
int i, err; int i, err;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -2367,7 +2367,7 @@ static int patch_alc260(struct hda_codec *codec) ...@@ -2367,7 +2367,7 @@ static int patch_alc260(struct hda_codec *codec)
struct alc_spec *spec; struct alc_spec *spec;
int board_config; int board_config;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -2617,7 +2617,7 @@ static int patch_alc882(struct hda_codec *codec) ...@@ -2617,7 +2617,7 @@ static int patch_alc882(struct hda_codec *codec)
{ {
struct alc_spec *spec; struct alc_spec *spec;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -283,7 +283,7 @@ static struct hda_codec_ops si3054_patch_ops = { ...@@ -283,7 +283,7 @@ static struct hda_codec_ops si3054_patch_ops = {
static int patch_si3054(struct hda_codec *codec) static int patch_si3054(struct hda_codec *codec)
{ {
struct si3054_spec *spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); struct si3054_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
codec->spec = spec; codec->spec = spec;
......
...@@ -919,7 +919,7 @@ static int patch_stac9200(struct hda_codec *codec) ...@@ -919,7 +919,7 @@ static int patch_stac9200(struct hda_codec *codec)
struct sigmatel_spec *spec; struct sigmatel_spec *spec;
int err; int err;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -957,7 +957,7 @@ static int patch_stac922x(struct hda_codec *codec) ...@@ -957,7 +957,7 @@ static int patch_stac922x(struct hda_codec *codec)
struct sigmatel_spec *spec; struct sigmatel_spec *spec;
int err; int err;
spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL) if (spec == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -1796,7 +1796,7 @@ static int __devinit aureon_init(ice1712_t *ice) ...@@ -1796,7 +1796,7 @@ static int __devinit aureon_init(ice1712_t *ice)
} }
/* to remeber the register values of CS8415 */ /* to remeber the register values of CS8415 */
ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL);
if (! ice->akm) if (! ice->akm)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
......
...@@ -2529,7 +2529,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card, ...@@ -2529,7 +2529,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
return -ENXIO; return -ENXIO;
} }
ice = kcalloc(1, sizeof(*ice), GFP_KERNEL); ice = kzalloc(sizeof(*ice), GFP_KERNEL);
if (ice == NULL) { if (ice == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2124,7 +2124,7 @@ static int __devinit snd_vt1724_create(snd_card_t * card, ...@@ -2124,7 +2124,7 @@ static int __devinit snd_vt1724_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
ice = kcalloc(1, sizeof(*ice), GFP_KERNEL); ice = kzalloc(sizeof(*ice), GFP_KERNEL);
if (ice == NULL) { if (ice == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -182,7 +182,7 @@ static int __devinit juli_init(ice1712_t *ice) ...@@ -182,7 +182,7 @@ static int __devinit juli_init(ice1712_t *ice)
ice->num_total_dacs = 2; ice->num_total_dacs = 2;
ice->num_total_adcs = 2; ice->num_total_adcs = 2;
ak = ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL);
if (! ak) if (! ak)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
......
...@@ -122,7 +122,7 @@ static int __devinit phase22_init(ice1712_t *ice) ...@@ -122,7 +122,7 @@ static int __devinit phase22_init(ice1712_t *ice)
} }
// Initialize analog chips // Initialize analog chips
ak = ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL);
if (! ak) if (! ak)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
...@@ -386,7 +386,7 @@ static int __devinit phase28_init(ice1712_t *ice) ...@@ -386,7 +386,7 @@ static int __devinit phase28_init(ice1712_t *ice)
ice->num_total_adcs = 2; ice->num_total_adcs = 2;
// Initialize analog chips // Initialize analog chips
ak = ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL);
if (!ak) if (!ak)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
......
...@@ -781,7 +781,7 @@ static int __devinit pontis_init(ice1712_t *ice) ...@@ -781,7 +781,7 @@ static int __devinit pontis_init(ice1712_t *ice)
ice->num_total_adcs = 2; ice->num_total_adcs = 2;
/* to remeber the register values */ /* to remeber the register values */
ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL);
if (! ice->akm) if (! ice->akm)
return -ENOMEM; return -ENOMEM;
ice->akm_codecs = 1; ice->akm_codecs = 1;
......
...@@ -2604,7 +2604,7 @@ static int __devinit snd_intel8x0_create(snd_card_t * card, ...@@ -2604,7 +2604,7 @@ static int __devinit snd_intel8x0_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1113,7 +1113,7 @@ static int __devinit snd_intel8x0m_create(snd_card_t * card, ...@@ -1113,7 +1113,7 @@ static int __devinit snd_intel8x0m_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2220,7 +2220,7 @@ static int __devinit snd_korg1212_create(snd_card_t * card, struct pci_dev *pci, ...@@ -2220,7 +2220,7 @@ static int __devinit snd_korg1212_create(snd_card_t * card, struct pci_dev *pci,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
korg1212 = kcalloc(1, sizeof(*korg1212), GFP_KERNEL); korg1212 = kzalloc(sizeof(*korg1212), GFP_KERNEL);
if (korg1212 == NULL) { if (korg1212 == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2660,7 +2660,7 @@ snd_m3_create(snd_card_t *card, struct pci_dev *pci, ...@@ -2660,7 +2660,7 @@ snd_m3_create(snd_card_t *card, struct pci_dev *pci,
return -ENXIO; return -ENXIO;
} }
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1004,7 +1004,7 @@ static int __devinit snd_mixart_create(mixart_mgr_t *mgr, snd_card_t *card, int ...@@ -1004,7 +1004,7 @@ static int __devinit snd_mixart_create(mixart_mgr_t *mgr, snd_card_t *card, int
.dev_free = snd_mixart_chip_dev_free, .dev_free = snd_mixart_chip_dev_free,
}; };
mgr->chip[idx] = chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (! chip) { if (! chip) {
snd_printk(KERN_ERR "cannot allocate chip\n"); snd_printk(KERN_ERR "cannot allocate chip\n");
return -ENOMEM; return -ENOMEM;
...@@ -1292,7 +1292,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, ...@@ -1292,7 +1292,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
/* /*
*/ */
mgr = kcalloc(1, sizeof(*mgr), GFP_KERNEL); mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
if (! mgr) { if (! mgr) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1389,7 +1389,7 @@ snd_nm256_create(snd_card_t *card, struct pci_dev *pci, ...@@ -1389,7 +1389,7 @@ snd_nm256_create(snd_card_t *card, struct pci_dev *pci,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -1250,7 +1250,7 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card, ...@@ -1250,7 +1250,7 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
return -ENXIO; return -ENXIO;
} }
sonic = kcalloc(1, sizeof(*sonic), GFP_KERNEL); sonic = kzalloc(sizeof(*sonic), GFP_KERNEL);
if (sonic == NULL) { if (sonic == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2960,7 +2960,7 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device ...@@ -2960,7 +2960,7 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device
.read = snd_trident_codec_read, .read = snd_trident_codec_read,
}; };
uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
if (!uctl) if (!uctl)
return -ENOMEM; return -ENOMEM;
...@@ -3546,7 +3546,7 @@ int __devinit snd_trident_create(snd_card_t * card, ...@@ -3546,7 +3546,7 @@ int __devinit snd_trident_create(snd_card_t * card,
return -ENXIO; return -ENXIO;
} }
trident = kcalloc(1, sizeof(*trident), GFP_KERNEL); trident = kzalloc(sizeof(*trident), GFP_KERNEL);
if (trident == NULL) { if (trident == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
...@@ -2058,7 +2058,7 @@ static int __devinit snd_via82xx_create(snd_card_t * card, ...@@ -2058,7 +2058,7 @@ static int __devinit snd_via82xx_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) { if ((chip = kzalloc(sizeof(*chip), GFP_KERNEL)) == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -1083,7 +1083,7 @@ static int __devinit snd_via82xx_create(snd_card_t * card, ...@@ -1083,7 +1083,7 @@ static int __devinit snd_via82xx_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) { if ((chip = kzalloc(sizeof(*chip), GFP_KERNEL)) == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -839,7 +839,7 @@ static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream) ...@@ -839,7 +839,7 @@ static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream)
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
ymfpci_pcm_t *ypcm; ymfpci_pcm_t *ypcm;
ypcm = kcalloc(1, sizeof(*ypcm), GFP_KERNEL); ypcm = kzalloc(sizeof(*ypcm), GFP_KERNEL);
if (ypcm == NULL) if (ypcm == NULL)
return -ENOMEM; return -ENOMEM;
ypcm->chip = chip; ypcm->chip = chip;
...@@ -957,7 +957,7 @@ static int snd_ymfpci_capture_open(snd_pcm_substream_t * substream, ...@@ -957,7 +957,7 @@ static int snd_ymfpci_capture_open(snd_pcm_substream_t * substream,
snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_runtime_t *runtime = substream->runtime;
ymfpci_pcm_t *ypcm; ymfpci_pcm_t *ypcm;
ypcm = kcalloc(1, sizeof(*ypcm), GFP_KERNEL); ypcm = kzalloc(sizeof(*ypcm), GFP_KERNEL);
if (ypcm == NULL) if (ypcm == NULL)
return -ENOMEM; return -ENOMEM;
ypcm->chip = chip; ypcm->chip = chip;
...@@ -2270,7 +2270,7 @@ int __devinit snd_ymfpci_create(snd_card_t * card, ...@@ -2270,7 +2270,7 @@ int __devinit snd_ymfpci_create(snd_card_t * card,
if ((err = pci_enable_device(pci)) < 0) if ((err = pci_enable_device(pci)) < 0)
return err; return err;
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL) { if (chip == NULL) {
pci_disable_device(pci); pci_disable_device(pci);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册