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

Commit e8ed6820 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

ALSA: timer: remove some dead code



We just checked "id.card < 0" on the lines before so we know it's not
true here.  We can delete that check.

Also checkpatch.pl complains about some extra curly braces so we may as
well fix that while we're at it.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5885615e
Loading
Loading
Loading
Loading
+6 −11
Original line number Original line Diff line number Diff line
@@ -1427,23 +1427,18 @@ static int snd_timer_user_next_device(struct snd_timer_id __user *_tid)
			break;
			break;
		case SNDRV_TIMER_CLASS_CARD:
		case SNDRV_TIMER_CLASS_CARD:
		case SNDRV_TIMER_CLASS_PCM:
		case SNDRV_TIMER_CLASS_PCM:
			if (id.card < 0) {
				id.card = 0;
			} else {
			if (id.card < 0) {
			if (id.card < 0) {
				id.card = 0;
				id.card = 0;
			} else {
			} else {
				if (id.device < 0) {
				if (id.device < 0) {
					id.device = 0;
					id.device = 0;
				} else {
				} else {
						if (id.subdevice < 0) {
					if (id.subdevice < 0)
						id.subdevice = 0;
						id.subdevice = 0;
						} else {
					else
						id.subdevice++;
						id.subdevice++;
				}
				}
			}
			}
				}
			}
			list_for_each(p, &snd_timer_list) {
			list_for_each(p, &snd_timer_list) {
				timer = list_entry(p, struct snd_timer, device_list);
				timer = list_entry(p, struct snd_timer, device_list);
				if (timer->tmr_class > id.dev_class) {
				if (timer->tmr_class > id.dev_class) {