Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecca82b4 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Replace with kzalloc() - seq stuff



ALSA sequencer,Instrument layer,ALSA<-OSS sequencer
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ca2c0966
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
		return -EFAULT;
	*data += sizeof(xp);
	*len -= sizeof(xp);
	wp = kcalloc(1, sizeof(*wp), gfp_mask);
	wp = kzalloc(sizeof(*wp), gfp_mask);
	if (wp == NULL)
		return -ENOMEM;
	wp->share_id[0] = le32_to_cpu(xp.share_id[0]);
+3 −3
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
		points_size = (le16_to_cpu(rx.nattack) + le16_to_cpu(rx.nrelease)) * 2 * sizeof(__u16);
		if (points_size > *len)
			return -EINVAL;
		rp = kcalloc(1, sizeof(*rp) + points_size, gfp_mask);
		rp = kzalloc(sizeof(*rp) + points_size, gfp_mask);
		if (rp == NULL)
			return -ENOMEM;
		rp->nattack = le16_to_cpu(rx.nattack);
@@ -139,7 +139,7 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
		return -EFAULT;
	*data += sizeof(xp);
	*len -= sizeof(xp);
	wp = kcalloc(1, sizeof(*wp), gfp_mask);
	wp = kzalloc(sizeof(*wp), gfp_mask);
	if (wp == NULL)
		return -ENOMEM;
	wp->share_id[0] = le32_to_cpu(xp.share_id[0]);
@@ -273,7 +273,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
			snd_seq_iwffff_instr_free(ops, ip, atomic);
			return -EINVAL;
		}
		lp = kcalloc(1, sizeof(*lp), gfp_mask);
		lp = kzalloc(sizeof(*lp), gfp_mask);
		if (lp == NULL) {
			snd_seq_iwffff_instr_free(ops, ip, atomic);
			return -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ snd_seq_oss_open(struct file *file, int level)
	int i, rc;
	seq_oss_devinfo_t *dp;

	if ((dp = kcalloc(1, sizeof(*dp), GFP_KERNEL)) == NULL) {
	if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) {
		snd_printk(KERN_ERR "can't malloc device info\n");
		return -ENOMEM;
	}
+3 −3
Original line number Diff line number Diff line
@@ -76,8 +76,8 @@ snd_seq_oss_midi_lookup_ports(int client)
	snd_seq_client_info_t *clinfo;
	snd_seq_port_info_t *pinfo;

	clinfo = kcalloc(1, sizeof(*clinfo), GFP_KERNEL);
	pinfo = kcalloc(1, sizeof(*pinfo), GFP_KERNEL);
	clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL);
	pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
	if (! clinfo || ! pinfo) {
		kfree(clinfo);
		kfree(pinfo);
@@ -172,7 +172,7 @@ snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo)
	/*
	 * allocate midi info record
	 */
	if ((mdev = kcalloc(1, sizeof(*mdev), GFP_KERNEL)) == NULL) {
	if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) {
		snd_printk(KERN_ERR "can't malloc midi info\n");
		return -ENOMEM;
	}
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen)
{
	seq_oss_readq_t *q;

	if ((q = kcalloc(1, sizeof(*q), GFP_KERNEL)) == NULL) {
	if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
		snd_printk(KERN_ERR "can't malloc read queue\n");
		return NULL;
	}
Loading