diff options
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r-- | sound/sparc/dbri.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 2edb0ad3de7e..c257ad8bdfbc 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2225,7 +2225,6 @@ static int __devinit snd_dbri_pcm(struct snd_card *card) | |||
2225 | /* playback count */ 1, | 2225 | /* playback count */ 1, |
2226 | /* capture count */ 1, &pcm)) < 0) | 2226 | /* capture count */ 1, &pcm)) < 0) |
2227 | return err; | 2227 | return err; |
2228 | snd_assert(pcm != NULL, return -EINVAL); | ||
2229 | 2228 | ||
2230 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_dbri_ops); | 2229 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_dbri_ops); |
2231 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_dbri_ops); | 2230 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_dbri_ops); |
@@ -2265,9 +2264,10 @@ static int snd_cs4215_get_volume(struct snd_kcontrol *kcontrol, | |||
2265 | { | 2264 | { |
2266 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); | 2265 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); |
2267 | struct dbri_streaminfo *info; | 2266 | struct dbri_streaminfo *info; |
2268 | snd_assert(dbri != NULL, return -EINVAL); | 2267 | |
2268 | if (snd_BUG_ON(!dbri)) | ||
2269 | return -EINVAL; | ||
2269 | info = &dbri->stream_info[kcontrol->private_value]; | 2270 | info = &dbri->stream_info[kcontrol->private_value]; |
2270 | snd_assert(info != NULL, return -EINVAL); | ||
2271 | 2271 | ||
2272 | ucontrol->value.integer.value[0] = info->left_gain; | 2272 | ucontrol->value.integer.value[0] = info->left_gain; |
2273 | ucontrol->value.integer.value[1] = info->right_gain; | 2273 | ucontrol->value.integer.value[1] = info->right_gain; |
@@ -2333,7 +2333,9 @@ static int snd_cs4215_get_single(struct snd_kcontrol *kcontrol, | |||
2333 | int shift = (kcontrol->private_value >> 8) & 0xff; | 2333 | int shift = (kcontrol->private_value >> 8) & 0xff; |
2334 | int mask = (kcontrol->private_value >> 16) & 0xff; | 2334 | int mask = (kcontrol->private_value >> 16) & 0xff; |
2335 | int invert = (kcontrol->private_value >> 24) & 1; | 2335 | int invert = (kcontrol->private_value >> 24) & 1; |
2336 | snd_assert(dbri != NULL, return -EINVAL); | 2336 | |
2337 | if (snd_BUG_ON(!dbri)) | ||
2338 | return -EINVAL; | ||
2337 | 2339 | ||
2338 | if (elem < 4) | 2340 | if (elem < 4) |
2339 | ucontrol->value.integer.value[0] = | 2341 | ucontrol->value.integer.value[0] = |
@@ -2358,7 +2360,9 @@ static int snd_cs4215_put_single(struct snd_kcontrol *kcontrol, | |||
2358 | int invert = (kcontrol->private_value >> 24) & 1; | 2360 | int invert = (kcontrol->private_value >> 24) & 1; |
2359 | int changed = 0; | 2361 | int changed = 0; |
2360 | unsigned short val; | 2362 | unsigned short val; |
2361 | snd_assert(dbri != NULL, return -EINVAL); | 2363 | |
2364 | if (snd_BUG_ON(!dbri)) | ||
2365 | return -EINVAL; | ||
2362 | 2366 | ||
2363 | val = (ucontrol->value.integer.value[0] & mask); | 2367 | val = (ucontrol->value.integer.value[0] & mask); |
2364 | if (invert == 1) | 2368 | if (invert == 1) |
@@ -2434,7 +2438,8 @@ static int __devinit snd_dbri_mixer(struct snd_card *card) | |||
2434 | int idx, err; | 2438 | int idx, err; |
2435 | struct snd_dbri *dbri; | 2439 | struct snd_dbri *dbri; |
2436 | 2440 | ||
2437 | snd_assert(card != NULL && card->private_data != NULL, return -EINVAL); | 2441 | if (snd_BUG_ON(!card || !card->private_data)) |
2442 | return -EINVAL; | ||
2438 | dbri = card->private_data; | 2443 | dbri = card->private_data; |
2439 | 2444 | ||
2440 | strcpy(card->mixername, card->shortname); | 2445 | strcpy(card->mixername, card->shortname); |