Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718148
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/6] ALSA: timer: Adjust a condition check in snd_timer_resolution() |
| Date | 2017-08-23 10:30 +0200 |
| Message-ID | <uhzd1-6Ct-45@gated-at.bofh.it> (permalink) |
| References | <uhmSw-6HP-59@gated-at.bofh.it> <uhwf7-4Nc-1@gated-at.bofh.it> <uhzd0-6Ct-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ALSA: core: Use common error handling code in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 21:20 +0200
Re: [PATCH] ALSA: core: Use common error handling code in two functions Takashi Iwai <tiwai@suse.de> - 2017-08-23 07:20 +0200
[PATCH 0/6] ALSA: core: Fine-tuning for some function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
[PATCH 3/6] ALSA: pcm: Adjust 11 checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
Re: [PATCH 3/6] ALSA: pcm: Adjust 11 checks for null pointers Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
[PATCH 2/6] ALSA: pcm: Adjust nine function calls together with a variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
Re: [PATCH 2/6] ALSA: pcm: Adjust nine function calls together with a variable assignment Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
[PATCH 1/6] ALSA: pcm: Use common error handling code in _snd_pcm_new() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
Re: [PATCH 1/6] ALSA: pcm: Use common error handling code in _snd_pcm_new() Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
[PATCH 4/6] ALSA: timer: Use common error handling code in alsa_timer_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
Re: [PATCH 4/6] ALSA: timer: Use common error handling code in alsa_timer_init() Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
[PATCH 5/6] ALSA: timer: Adjust a condition check in snd_timer_resolution() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:30 +0200
Re: [PATCH 5/6] ALSA: timer: Adjust a condition check in snd_timer_resolution() Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
[PATCH 6/6] ALSA: timer: Adjust 13 checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-23 10:40 +0200
Re: [PATCH 6/6] ALSA: timer: Adjust 13 checks for null pointers Takashi Iwai <tiwai@suse.de> - 2017-08-23 10:40 +0200
csiph-web