]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: timer: remove some dead code
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 31 Mar 2017 15:21:41 +0000 (18:21 +0300)
committerTakashi Iwai <tiwai@suse.de>
Fri, 31 Mar 2017 15:27:02 +0000 (17:27 +0200)
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c

index 6d4fbc439246925712f21c1b82e6b46ec859e021..8b9e7943a83b283a8211dbcd99c70c06ab34501d 100644 (file)
@@ -1430,18 +1430,13 @@ static int snd_timer_user_next_device(struct snd_timer_id __user *_tid)
                        if (id.card < 0) {
                                id.card = 0;
                        } else {
-                               if (id.card < 0) {
-                                       id.card = 0;
+                               if (id.device < 0) {
+                                       id.device = 0;
                                } else {
-                                       if (id.device < 0) {
-                                               id.device = 0;
-                                       } else {
-                                               if (id.subdevice < 0) {
-                                                       id.subdevice = 0;
-                                               } else {
-                                                       id.subdevice++;
-                                               }
-                                       }
+                                       if (id.subdevice < 0)
+                                               id.subdevice = 0;
+                                       else
+                                               id.subdevice++;
                                }
                        }
                        list_for_each(p, &snd_timer_list) {