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

Commit 387417b5 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Takashi Iwai
Browse files

ALSA: ice1712: remove unneeded return statement



the functions:
        snd_ice1712_akm4xxx_build_controls
        snd_ice1712_build_pro_mixer
        snd_ctl_add
        snd_ak4114_build
        prodigy192_ak4114_init
        snd_ak4113_build
are all returning either 0 or a negetive error value.
so we can easily remove the check for a negative value and return
the value instead.

Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9547c099
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -309,11 +309,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice)
		return err;
		return err;


	/* ak4524 controls */
	/* ak4524 controls */
	err = snd_ice1712_akm4xxx_build_controls(ice);
	return snd_ice1712_akm4xxx_build_controls(ice);
	if (err < 0)
		return err;

	return 0;
}
}


static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
+6 −13
Original line number Original line Diff line number Diff line
@@ -1295,10 +1295,7 @@ static int snd_ice1712_pcm_profi(struct snd_ice1712 *ice, int device, struct snd
			return err;
			return err;
	}
	}


	err = snd_ice1712_build_pro_mixer(ice);
	return snd_ice1712_build_pro_mixer(ice);
	if (err < 0)
		return err;
	return 0;
}
}


/*
/*
@@ -1545,10 +1542,9 @@ static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
			dev_warn(ice->card->dev,
			dev_warn(ice->card->dev,
				 "cannot initialize ac97 for consumer, skipped\n");
				 "cannot initialize ac97 for consumer, skipped\n");
		else {
		else {
			err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice));
			return snd_ctl_add(ice->card,
			if (err < 0)
			snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97,
				return err;
				     ice));
			return 0;
		}
		}
	}
	}


@@ -2497,11 +2493,8 @@ static int snd_ice1712_build_controls(struct snd_ice1712 *ice)
	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice));
	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice));
	if (err < 0)
	if (err < 0)
		return err;
		return err;
	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
	return snd_ctl_add(ice->card,
	if (err < 0)
			   snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
		return err;

	return 0;
}
}


static int snd_ice1712_free(struct snd_ice1712 *ice)
static int snd_ice1712_free(struct snd_ice1712 *ice)
+2 −5
Original line number Original line Diff line number Diff line
@@ -2497,11 +2497,8 @@ static int snd_vt1724_build_controls(struct snd_ice1712 *ice)
			return err;
			return err;
	}
	}


	err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
	return snd_ctl_add(ice->card,
	if (err < 0)
			   snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
		return err;

	return 0;
}
}


static int snd_vt1724_free(struct snd_ice1712 *ice)
static int snd_vt1724_free(struct snd_ice1712 *ice)
+1 −4
Original line number Original line Diff line number Diff line
@@ -475,11 +475,8 @@ static int juli_add_controls(struct snd_ice1712 *ice)
		return err;
		return err;


	/* only capture SPDIF over AK4114 */
	/* only capture SPDIF over AK4114 */
	err = snd_ak4114_build(spec->ak4114, NULL,
	return snd_ak4114_build(spec->ak4114, NULL,
			ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
			ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
	if (err < 0)
		return err;
	return 0;
}
}


/*
/*
+1 −3
Original line number Original line Diff line number Diff line
@@ -758,10 +758,8 @@ static int prodigy192_init(struct snd_ice1712 *ice)
			"AK4114 initialized with status %d\n", err);
			"AK4114 initialized with status %d\n", err);
	} else
	} else
		dev_dbg(ice->card->dev, "AK4114 not found\n");
		dev_dbg(ice->card->dev, "AK4114 not found\n");
	if (err < 0)
		return err;


	return 0;
	return err;
}
}




Loading