Re: [PATCH] staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 4, 2020 at 3:46 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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@xxxxxxxxxx>

Thanks Dan for sharing this patch.

Reviewed-by: Vaibhav Agarwal <vaibhav.sr@xxxxxxxxx>

> ---
>  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
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux