]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ALSA: dice: check clock change timeout
authorClemens Ladisch <clemens@ladisch.de>
Thu, 5 Jan 2012 21:16:24 +0000 (22:16 +0100)
committerClemens Ladisch <clemens@ladisch.de>
Sun, 20 Oct 2013 20:07:57 +0000 (22:07 +0200)
Output a warning if the wait for the clock change notification times
out.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/firewire/dice.c

index 61dd00c4fae3f2be962ffd22998dc784d0193a02..3395c8ba7af1180f95c40ff3a9f7864af5e101ee 100644 (file)
@@ -551,8 +551,9 @@ static int dice_change_rate(struct dice *dice, unsigned int clock_rate)
        if (err < 0)
                return err;
 
-       wait_for_completion_timeout(&dice->clock_accepted,
-                                   msecs_to_jiffies(100));
+       if (!wait_for_completion_timeout(&dice->clock_accepted,
+                                        msecs_to_jiffies(100)))
+               dev_warn(&dice->unit->device, "clock change timed out\n");
 
        return 0;
 }