ALSA: timer: Fix incorrectly assigned timer instance
[linux-2.6-block.git] / sound / core / timer.c
index 6b724d2ee2de9b0de0106bf5d2586e8f77677cd7..59ae21b0bb936c0757d58573b1bac3ed3defcb1a 100644 (file)
@@ -284,11 +284,11 @@ int snd_timer_open(struct snd_timer_instance **ti,
                goto unlock;
        }
        if (!list_empty(&timer->open_list_head)) {
-               timeri = list_entry(timer->open_list_head.next,
+               struct snd_timer_instance *t =
+                       list_entry(timer->open_list_head.next,
                                    struct snd_timer_instance, open_list);
-               if (timeri->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) {
+               if (t->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) {
                        err = -EBUSY;
-                       timeri = NULL;
                        goto unlock;
                }
        }