[PATCH 5/6] ALSA: timer: Adjust a condition check in snd_timer_resolution()
From: SF Markus Elfring
Date: Wed Aug 23 2017 - 04:29:41 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Aug 2017 09:45:06 +0200
The script "checkpatch.pl" pointed information out like the following.
ERROR: do not use assignment in if condition
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
sound/core/timer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 6d73a63f6e2b..6cdd04a45962 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -395,5 +395,6 @@ unsigned long snd_timer_resolution(struct snd_timer_instance *timeri)
return 0;
- if ((timer = timeri->timer) != NULL) {
+ timer = timeri->timer;
+ if (timer) {
if (timer->hw.c_resolution)
return timer->hw.c_resolution(timer);
return timer->hw.resolution;
--
2.14.0