Skip to content

Commit

Permalink
ALSA: dice: check clock change timeout
Browse files Browse the repository at this point in the history
Output a warning if the wait for the clock change notification times
out.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
  • Loading branch information
Clemens Ladisch committed Oct 20, 2013
1 parent 4edeb83 commit 640d9b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/firewire/dice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 640d9b4

Please sign in to comment.