Skip to content

Commit

Permalink
ALSA: timer: Coding style fixes
Browse files Browse the repository at this point in the history
Avoid old school C style but do plain and clear way.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 10, 2019
1 parent 41672c0 commit 5d704b0
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,10 @@ static int snd_timer_user_start(struct file *file)
snd_timer_stop(tu->timeri);
tu->timeri->lost = 0;
tu->last_resolution = 0;
return (err = snd_timer_start(tu->timeri, tu->ticks)) < 0 ? err : 0;
err = snd_timer_start(tu->timeri, tu->ticks);
if (err < 0)
return err;
return 0;
}

static int snd_timer_user_stop(struct file *file)
Expand All @@ -1920,7 +1923,10 @@ static int snd_timer_user_stop(struct file *file)
tu = file->private_data;
if (!tu->timeri)
return -EBADFD;
return (err = snd_timer_stop(tu->timeri)) < 0 ? err : 0;
err = snd_timer_stop(tu->timeri);
if (err < 0)
return err;
return 0;
}

static int snd_timer_user_continue(struct file *file)
Expand All @@ -1935,7 +1941,10 @@ static int snd_timer_user_continue(struct file *file)
if (!(tu->timeri->flags & SNDRV_TIMER_IFLG_PAUSED))
return snd_timer_user_start(file);
tu->timeri->lost = 0;
return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0;
err = snd_timer_continue(tu->timeri);
if (err < 0)
return err;
return 0;
}

static int snd_timer_user_pause(struct file *file)
Expand All @@ -1946,7 +1955,10 @@ static int snd_timer_user_pause(struct file *file)
tu = file->private_data;
if (!tu->timeri)
return -EBADFD;
return (err = snd_timer_pause(tu->timeri)) < 0 ? err : 0;
err = snd_timer_pause(tu->timeri);
if (err < 0)
return err;
return 0;
}

enum {
Expand Down

0 comments on commit 5d704b0

Please sign in to comment.