[ALSA] Replace with kzalloc() - others
Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers AK4114 receiver,AK4117 receiver,PDAudioCF driver,PPC PMAC driver SPARC AMD7930 driver,SPARC cs4231 driver,Synth,Common EMU synth USB generic driver,USB USX2Y Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Jaroslav Kysela
parent
e560d8d836
commit
561b220a4d
@@ -200,7 +200,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
|
||||
|
||||
if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), &device)) < 0)
|
||||
return err;
|
||||
chip = device->private_data = kcalloc(1, sizeof(*chip), GFP_KERNEL);
|
||||
chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
if (chip == NULL) {
|
||||
snd_i2c_device_free(device);
|
||||
return -ENOMEM;
|
||||
|
@@ -81,7 +81,7 @@ int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master
|
||||
};
|
||||
|
||||
*ri2c = NULL;
|
||||
bus = kcalloc(1, sizeof(*bus), GFP_KERNEL);
|
||||
bus = kzalloc(sizeof(*bus), GFP_KERNEL);
|
||||
if (bus == NULL)
|
||||
return -ENOMEM;
|
||||
init_MUTEX(&bus->lock_mutex);
|
||||
@@ -108,7 +108,7 @@ int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char ad
|
||||
|
||||
*rdevice = NULL;
|
||||
snd_assert(bus != NULL, return -EINVAL);
|
||||
device = kcalloc(1, sizeof(*device), GFP_KERNEL);
|
||||
device = kzalloc(sizeof(*device), GFP_KERNEL);
|
||||
if (device == NULL)
|
||||
return -ENOMEM;
|
||||
device->addr = addr;
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* 2002-05-12 Tomas Kasparek another code cleanup
|
||||
*/
|
||||
|
||||
/* $Id: uda1341.c,v 1.15 2005/01/03 12:05:20 tiwai Exp $ */
|
||||
/* $Id: uda1341.c,v 1.16 2005/09/09 13:22:34 tiwai Exp $ */
|
||||
|
||||
#include <sound/driver.h>
|
||||
#include <linux/module.h>
|
||||
@@ -670,7 +670,7 @@ int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt)
|
||||
|
||||
snd_assert(card != NULL, return -EINVAL);
|
||||
|
||||
uda1341 = kcalloc(1, sizeof(*uda1341), GFP_KERNEL);
|
||||
uda1341 = kzalloc(sizeof(*uda1341), GFP_KERNEL);
|
||||
if (uda1341 == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -707,7 +707,7 @@ static int uda1341_attach(struct l3_client *clnt)
|
||||
{
|
||||
struct uda1341 *uda;
|
||||
|
||||
uda = kcalloc(1, sizeof(*uda), 0, GFP_KERNEL);
|
||||
uda = kzalloc(sizeof(*uda), 0, GFP_KERNEL);
|
||||
if (!uda)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@@ -92,7 +92,7 @@ int snd_ak4114_create(snd_card_t *card,
|
||||
.dev_free = snd_ak4114_dev_free,
|
||||
};
|
||||
|
||||
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
|
||||
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
if (chip == NULL)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&chip->lock);
|
||||
|
@@ -83,7 +83,7 @@ int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *wri
|
||||
.dev_free = snd_ak4117_dev_free,
|
||||
};
|
||||
|
||||
chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
|
||||
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
if (chip == NULL)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&chip->lock);
|
||||
|
@@ -281,7 +281,7 @@ int snd_tea6330t_update_mixer(snd_card_t * card,
|
||||
u8 default_treble, default_bass;
|
||||
unsigned char bytes[7];
|
||||
|
||||
tea = kcalloc(1, sizeof(*tea), GFP_KERNEL);
|
||||
tea = kzalloc(sizeof(*tea), GFP_KERNEL);
|
||||
if (tea == NULL)
|
||||
return -ENOMEM;
|
||||
if ((err = snd_i2c_device_create(bus, "TEA6330T", TEA6330T_ADDR, &device)) < 0) {
|
||||
|
Reference in New Issue
Block a user