diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-03-28 12:44:53 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-04-10 02:42:26 -0400 |
commit | 5d704b0d3b4855734f029337e516b829c473801c (patch) | |
tree | bbbbb408ba748e1765c4ee77034735232cb64494 /sound/core | |
parent | 41672c0c24a62699d20aab53b98d843b16483053 (diff) |
ALSA: timer: Coding style fixes
Avoid old school C style but do plain and clear way.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/timer.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 0eed4fe0da21..d23efec35660 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -1909,7 +1909,10 @@ static int snd_timer_user_start(struct file *file) | |||
1909 | snd_timer_stop(tu->timeri); | 1909 | snd_timer_stop(tu->timeri); |
1910 | tu->timeri->lost = 0; | 1910 | tu->timeri->lost = 0; |
1911 | tu->last_resolution = 0; | 1911 | tu->last_resolution = 0; |
1912 | return (err = snd_timer_start(tu->timeri, tu->ticks)) < 0 ? err : 0; | 1912 | err = snd_timer_start(tu->timeri, tu->ticks); |
1913 | if (err < 0) | ||
1914 | return err; | ||
1915 | return 0; | ||
1913 | } | 1916 | } |
1914 | 1917 | ||
1915 | static int snd_timer_user_stop(struct file *file) | 1918 | static int snd_timer_user_stop(struct file *file) |
@@ -1920,7 +1923,10 @@ static int snd_timer_user_stop(struct file *file) | |||
1920 | tu = file->private_data; | 1923 | tu = file->private_data; |
1921 | if (!tu->timeri) | 1924 | if (!tu->timeri) |
1922 | return -EBADFD; | 1925 | return -EBADFD; |
1923 | return (err = snd_timer_stop(tu->timeri)) < 0 ? err : 0; | 1926 | err = snd_timer_stop(tu->timeri); |
1927 | if (err < 0) | ||
1928 | return err; | ||
1929 | return 0; | ||
1924 | } | 1930 | } |
1925 | 1931 | ||
1926 | static int snd_timer_user_continue(struct file *file) | 1932 | static int snd_timer_user_continue(struct file *file) |
@@ -1935,7 +1941,10 @@ static int snd_timer_user_continue(struct file *file) | |||
1935 | if (!(tu->timeri->flags & SNDRV_TIMER_IFLG_PAUSED)) | 1941 | if (!(tu->timeri->flags & SNDRV_TIMER_IFLG_PAUSED)) |
1936 | return snd_timer_user_start(file); | 1942 | return snd_timer_user_start(file); |
1937 | tu->timeri->lost = 0; | 1943 | tu->timeri->lost = 0; |
1938 | return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; | 1944 | err = snd_timer_continue(tu->timeri); |
1945 | if (err < 0) | ||
1946 | return err; | ||
1947 | return 0; | ||
1939 | } | 1948 | } |
1940 | 1949 | ||
1941 | static int snd_timer_user_pause(struct file *file) | 1950 | static int snd_timer_user_pause(struct file *file) |
@@ -1946,7 +1955,10 @@ static int snd_timer_user_pause(struct file *file) | |||
1946 | tu = file->private_data; | 1955 | tu = file->private_data; |
1947 | if (!tu->timeri) | 1956 | if (!tu->timeri) |
1948 | return -EBADFD; | 1957 | return -EBADFD; |
1949 | return (err = snd_timer_pause(tu->timeri)) < 0 ? err : 0; | 1958 | err = snd_timer_pause(tu->timeri); |
1959 | if (err < 0) | ||
1960 | return err; | ||
1961 | return 0; | ||
1950 | } | 1962 | } |
1951 | 1963 | ||
1952 | enum { | 1964 | enum { |