diff options
| author | Pierre-Louis Bossart <[email protected]> | 2020-09-02 21:21:19 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2020-09-03 07:25:16 +0000 |
| commit | 63632563c0dfe036215dcba222a0f899d35f7be6 (patch) | |
| tree | bf7e09b034a24d55260946260e15536b6c79cd6a /sound/core/timer.c | |
| parent | ALSA: core: pcm_memory: dereference pointer after NULL checks (diff) | |
| download | kernel-63632563c0dfe036215dcba222a0f899d35f7be6.tar.gz kernel-63632563c0dfe036215dcba222a0f899d35f7be6.zip | |
ALSA: core: timer: remove redundant assignment
Cppcheck complains about a possible NULL pointer dereference but it
actually looks like the NULL assignment is not needed (same loop is
used in other parts of the file without it).
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'sound/core/timer.c')
| -rw-r--r-- | sound/core/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index d9f85f2d66a3..1349f5b5be09 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL(snd_timer_instance_free); */ static struct snd_timer *snd_timer_find(struct snd_timer_id *tid) { - struct snd_timer *timer = NULL; + struct snd_timer *timer; list_for_each_entry(timer, &snd_timer_list, device_list) { if (timer->tmr_class != tid->dev_class) |
