linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: solo6x10: fix missing snd_card_free in error handling case
@ 2020-11-11  3:22 Qinglang Miao
  2020-11-11 18:21 ` Ismael Luceno
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-11-11  3:22 UTC (permalink / raw)
  To: Bluecherry Maintainers, Anton Sviridenko, Andrey Utkin,
	Ismael Luceno, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Qinglang Miao

Fix to goto snd_error in error handling case when fails
to do snd_ctl_add, as done elsewhere in this function.

Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c
index 906ce86437ae..d137b94869d8 100644
--- a/drivers/media/pci/solo6x10/solo6x10-g723.c
+++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
@@ -385,7 +385,7 @@ int solo_g723_init(struct solo_dev *solo_dev)
 
 	ret = snd_ctl_add(card, snd_ctl_new1(&kctl, solo_dev));
 	if (ret < 0)
-		return ret;
+		goto snd_error;
 
 	ret = solo_snd_pcm_init(solo_dev);
 	if (ret < 0)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: solo6x10: fix missing snd_card_free in error handling case
  2020-11-11  3:22 [PATCH] media: solo6x10: fix missing snd_card_free in error handling case Qinglang Miao
@ 2020-11-11 18:21 ` Ismael Luceno
  0 siblings, 0 replies; 2+ messages in thread
From: Ismael Luceno @ 2020-11-11 18:21 UTC (permalink / raw)
  To: Qinglang Miao
  Cc: Bluecherry Maintainers, Anton Sviridenko, Andrey Utkin,
	Mauro Carvalho Chehab, linux-media, linux-kernel

On 11/Nov/2020 11:22, Qinglang Miao wrote:
> Fix to goto snd_error in error handling case when fails
> to do snd_ctl_add, as done elsewhere in this function.
> 
> Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c
> index 906ce86437ae..d137b94869d8 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-g723.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
> @@ -385,7 +385,7 @@ int solo_g723_init(struct solo_dev *solo_dev)
>  
>  	ret = snd_ctl_add(card, snd_ctl_new1(&kctl, solo_dev));
>  	if (ret < 0)
> -		return ret;
> +		goto snd_error;
>  
>  	ret = solo_snd_pcm_init(solo_dev);
>  	if (ret < 0)
> -- 
> 2.23.0
> 

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-11 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11  3:22 [PATCH] media: solo6x10: fix missing snd_card_free in error handling case Qinglang Miao
2020-11-11 18:21 ` Ismael Luceno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).