Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62121
b: refs/heads/master
c: 7c64ec3
h: refs/heads/master
i:
  62119: 9a85f1c
v: v3
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Jul 20, 2007
1 parent 22936f0 commit 462b0ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c28054d4b31d78272f65c0d11db0796f50fb9569
refs/heads/master: 7c64ec343a7d7b2d73b19e6bb8d9fd15f0462890
27 changes: 18 additions & 9 deletions trunk/sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1549,9 +1549,11 @@ static int snd_timer_user_info(struct file *file,
int err = 0;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
t = tu->timeri->timer;
snd_assert(t != NULL, return -ENXIO);
if (!t)
return -EBADFD;

info = kzalloc(sizeof(*info), GFP_KERNEL);
if (! info)
Expand Down Expand Up @@ -1579,9 +1581,11 @@ static int snd_timer_user_params(struct file *file,
int err;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
t = tu->timeri->timer;
snd_assert(t != NULL, return -ENXIO);
if (!t)
return -EBADFD;
if (copy_from_user(&params, _params, sizeof(params)))
return -EFAULT;
if (!(t->hw.flags & SNDRV_TIMER_HW_SLAVE) && params.ticks < 1) {
Expand Down Expand Up @@ -1675,7 +1679,8 @@ static int snd_timer_user_status(struct file *file,
struct snd_timer_status status;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
memset(&status, 0, sizeof(status));
status.tstamp = tu->tstamp;
status.resolution = snd_timer_resolution(tu->timeri);
Expand All @@ -1695,7 +1700,8 @@ static int snd_timer_user_start(struct file *file)
struct snd_timer_user *tu;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
snd_timer_stop(tu->timeri);
tu->timeri->lost = 0;
tu->last_resolution = 0;
Expand All @@ -1708,7 +1714,8 @@ static int snd_timer_user_stop(struct file *file)
struct snd_timer_user *tu;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
return (err = snd_timer_stop(tu->timeri)) < 0 ? err : 0;
}

Expand All @@ -1718,7 +1725,8 @@ static int snd_timer_user_continue(struct file *file)
struct snd_timer_user *tu;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
tu->timeri->lost = 0;
return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0;
}
Expand All @@ -1729,7 +1737,8 @@ static int snd_timer_user_pause(struct file *file)
struct snd_timer_user *tu;

tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
if (!tu->timeri)
return -EBADFD;
return (err = snd_timer_pause(tu->timeri)) < 0 ? err : 0;
}

Expand Down

0 comments on commit 462b0ba

Please sign in to comment.