瀏覽代碼

ALSA: dice: check clock change timeout

Output a warning if the wait for the clock change notification times
out.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Clemens Ladisch 13 年之前
父節點
當前提交
640d9b421d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      sound/firewire/dice.c

+ 3 - 2
sound/firewire/dice.c

@@ -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;
 }