* [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls()
@ 2020-08-04 10:16 Dan Carpenter
2020-08-04 16:57 ` Vaibhav Agarwal
2020-08-05 12:58 ` [greybus-dev] [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls Alex Elder
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-08-04 10:16 UTC (permalink / raw)
To: Johan Hovold, Vaibhav Agarwal
Cc: devel, Greg Kroah-Hartman, Alex Elder, kernel-janitors,
greybus-dev
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: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio modules")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/staging/greybus/audio_helper.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/audio_helper.c b/drivers/staging/greybus/audio_helper.c
index 8b100a71f02e..237531ba60f3 100644
--- a/drivers/staging/greybus/audio_helper.c
+++ b/drivers/staging/greybus/audio_helper.c
@@ -173,8 +173,7 @@ static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
id.index = control->index;
kctl = snd_ctl_find_id(card, &id);
if (!kctl) {
- dev_err(dev, "%d: Failed to find %s\n", err,
- control->name);
+ dev_err(dev, "Failed to find %s\n", control->name);
continue;
}
err = snd_ctl_remove(card, kctl);
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls()
2020-08-04 10:16 [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls() Dan Carpenter
@ 2020-08-04 16:57 ` Vaibhav Agarwal
2020-08-05 12:58 ` [greybus-dev] [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls Alex Elder
1 sibling, 0 replies; 3+ messages in thread
From: Vaibhav Agarwal @ 2020-08-04 16:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: devel, Alex Elder, Greg Kroah-Hartman, kernel-janitors,
Johan Hovold, greybus-dev
On Tue, Aug 4, 2020 at 3:46 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio modules")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks Dan for sharing this patch.
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
> ---
> drivers/staging/greybus/audio_helper.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/audio_helper.c b/drivers/staging/greybus/audio_helper.c
> index 8b100a71f02e..237531ba60f3 100644
> --- a/drivers/staging/greybus/audio_helper.c
> +++ b/drivers/staging/greybus/audio_helper.c
> @@ -173,8 +173,7 @@ static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
> id.index = control->index;
> kctl = snd_ctl_find_id(card, &id);
> if (!kctl) {
> - dev_err(dev, "%d: Failed to find %s\n", err,
> - control->name);
> + dev_err(dev, "Failed to find %s\n", control->name);
> continue;
> }
> err = snd_ctl_remove(card, kctl);
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [greybus-dev] [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls
2020-08-04 10:16 [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls() Dan Carpenter
2020-08-04 16:57 ` Vaibhav Agarwal
@ 2020-08-05 12:58 ` Alex Elder
1 sibling, 0 replies; 3+ messages in thread
From: Alex Elder @ 2020-08-05 12:58 UTC (permalink / raw)
To: Dan Carpenter, Johan Hovold, Vaibhav Agarwal
Cc: devel, greybus-dev, Alex Elder, kernel-janitors
On 8/4/20 5:16 AM, Dan Carpenter wrote:
> 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: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio modules")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This is a good fix, thanks.
Reviewed-by: Alex Elder <elder@linaro.org>
> ---
> drivers/staging/greybus/audio_helper.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/audio_helper.c b/drivers/staging/greybus/audio_helper.c
> index 8b100a71f02e..237531ba60f3 100644
> --- a/drivers/staging/greybus/audio_helper.c
> +++ b/drivers/staging/greybus/audio_helper.c
> @@ -173,8 +173,7 @@ static int gbaudio_remove_controls(struct snd_card *card, struct device *dev,
> id.index = control->index;
> kctl = snd_ctl_find_id(card, &id);
> if (!kctl) {
> - dev_err(dev, "%d: Failed to find %s\n", err,
> - control->name);
> + dev_err(dev, "Failed to find %s\n", control->name);
> continue;
> }
> err = snd_ctl_remove(card, kctl);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-05 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-04 10:16 [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls() Dan Carpenter
2020-08-04 16:57 ` Vaibhav Agarwal
2020-08-05 12:58 ` [greybus-dev] [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls Alex Elder
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.