diff options
Diffstat (limited to 'sound/core/rtctimer.c')
-rw-r--r-- | sound/core/rtctimer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c index 97b30fb4c361..51e64e30dd3b 100644 --- a/sound/core/rtctimer.c +++ b/sound/core/rtctimer.c | |||
@@ -91,7 +91,8 @@ static int | |||
91 | rtctimer_start(struct snd_timer *timer) | 91 | rtctimer_start(struct snd_timer *timer) |
92 | { | 92 | { |
93 | rtc_task_t *rtc = timer->private_data; | 93 | rtc_task_t *rtc = timer->private_data; |
94 | snd_assert(rtc != NULL, return -EINVAL); | 94 | if (snd_BUG_ON(!rtc)) |
95 | return -EINVAL; | ||
95 | rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq); | 96 | rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq); |
96 | rtc_control(rtc, RTC_PIE_ON, 0); | 97 | rtc_control(rtc, RTC_PIE_ON, 0); |
97 | return 0; | 98 | return 0; |
@@ -101,7 +102,8 @@ static int | |||
101 | rtctimer_stop(struct snd_timer *timer) | 102 | rtctimer_stop(struct snd_timer *timer) |
102 | { | 103 | { |
103 | rtc_task_t *rtc = timer->private_data; | 104 | rtc_task_t *rtc = timer->private_data; |
104 | snd_assert(rtc != NULL, return -EINVAL); | 105 | if (snd_BUG_ON(!rtc)) |
106 | return -EINVAL; | ||
105 | rtc_control(rtc, RTC_PIE_OFF, 0); | 107 | rtc_control(rtc, RTC_PIE_OFF, 0); |
106 | return 0; | 108 | return 0; |
107 | } | 109 | } |