Commit b15b4da8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls()

The "err" variable is not meaningful so there is no need to print it.
It's uninitialized on the first iteration through the loop.

Fixes: 510e340e ("staging: greybus: audio: Add helper APIs for dynamic audio modules")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarVaibhav Agarwal <vaibhav.sr@gmail.com>
Link: https://lore.kernel.org/r/20200804101601.GA392148@mwandaSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9123e3a7
...@@ -173,8 +173,7 @@ static int gbaudio_remove_controls(struct snd_card *card, struct device *dev, ...@@ -173,8 +173,7 @@ static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
id.index = control->index; id.index = control->index;
kctl = snd_ctl_find_id(card, &id); kctl = snd_ctl_find_id(card, &id);
if (!kctl) { if (!kctl) {
dev_err(dev, "%d: Failed to find %s\n", err, dev_err(dev, "Failed to find %s\n", control->name);
control->name);
continue; continue;
} }
err = snd_ctl_remove(card, kctl); err = snd_ctl_remove(card, kctl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment