All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
@ 2022-02-16  2:11 ` Yang Li
  0 siblings, 0 replies; 5+ messages in thread
From: Yang Li @ 2022-02-16  2:11 UTC (permalink / raw)
  To: perex
  Cc: tiwai, lgirdwood, broonie, quic_srivasam, alsa-devel,
	linux-kernel, Yang Li, Abaci Robot

Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but
dereferenced.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 sound/soc/codecs/wcd938x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 2663fe0bf64f..c46c4bfd84f2 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ
 	struct wcd938x_priv *wcd938x;
 
 	if (!component) {
-		dev_err(component->dev, "%s component is NULL\n", __func__);
+		pr_err("The snd_soc_component is NULL\n");
 		return false;
 	}
 
-- 
2.20.1.7.g153144c


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

* [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
@ 2022-02-16  2:11 ` Yang Li
  0 siblings, 0 replies; 5+ messages in thread
From: Yang Li @ 2022-02-16  2:11 UTC (permalink / raw)
  To: perex
  Cc: alsa-devel, lgirdwood, Abaci Robot, linux-kernel, tiwai, broonie,
	Yang Li, quic_srivasam

Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but
dereferenced.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 sound/soc/codecs/wcd938x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 2663fe0bf64f..c46c4bfd84f2 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ
 	struct wcd938x_priv *wcd938x;
 
 	if (!component) {
-		dev_err(component->dev, "%s component is NULL\n", __func__);
+		pr_err("The snd_soc_component is NULL\n");
 		return false;
 	}
 
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
  2022-02-16  2:11 ` Yang Li
@ 2022-02-16 11:33   ` Srinivasa Rao Mandadapu
  -1 siblings, 0 replies; 5+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-02-16 11:33 UTC (permalink / raw)
  To: Yang Li, perex
  Cc: tiwai, lgirdwood, broonie, alsa-devel, linux-kernel, Abaci Robot


On 2/16/2022 7:41 AM, Yang Li wrote:
Thanks for Fix Yang!!!
We are going to post complete cleaned patch. Shall we ignore this patch 
for now?
> Eliminate the following coccicheck warning:
> ./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but
> dereferenced.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>   sound/soc/codecs/wcd938x.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
> index 2663fe0bf64f..c46c4bfd84f2 100644
> --- a/sound/soc/codecs/wcd938x.c
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ
>   	struct wcd938x_priv *wcd938x;
>   
>   	if (!component) {
> -		dev_err(component->dev, "%s component is NULL\n", __func__);
> +		pr_err("The snd_soc_component is NULL\n");
>   		return false;
>   	}
>   

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

* Re: [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
@ 2022-02-16 11:33   ` Srinivasa Rao Mandadapu
  0 siblings, 0 replies; 5+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-02-16 11:33 UTC (permalink / raw)
  To: Yang Li, perex
  Cc: alsa-devel, lgirdwood, Abaci Robot, linux-kernel, tiwai, broonie


On 2/16/2022 7:41 AM, Yang Li wrote:
Thanks for Fix Yang!!!
We are going to post complete cleaned patch. Shall we ignore this patch 
for now?
> Eliminate the following coccicheck warning:
> ./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but
> dereferenced.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>   sound/soc/codecs/wcd938x.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
> index 2663fe0bf64f..c46c4bfd84f2 100644
> --- a/sound/soc/codecs/wcd938x.c
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ
>   	struct wcd938x_priv *wcd938x;
>   
>   	if (!component) {
> -		dev_err(component->dev, "%s component is NULL\n", __func__);
> +		pr_err("The snd_soc_component is NULL\n");
>   		return false;
>   	}
>   

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

* 回复:[PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
  2022-02-16 11:33   ` Srinivasa Rao Mandadapu
  (?)
@ 2022-02-17  2:50   ` Yang.Lee
  -1 siblings, 0 replies; 5+ messages in thread
From: Yang.Lee @ 2022-02-17  2:50 UTC (permalink / raw)
  To: perex, Srinivasa Rao Mandadapu
  Cc: alsa-devel, lgirdwood, Abaci Robot, linux-kernel, tiwai, broonie

It's okay for me,thanks.
------------------------------------------------------------------
发件人:Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
发送时间:2022年2月16日(星期三) 19:34
收件人:Yang Li <yang.lee@linux.alibaba.com>; perex <perex@perex.cz>
抄 送:tiwai <tiwai@suse.com>; lgirdwood <lgirdwood@gmail.com>; broonie <broonie@kernel.org>; alsa-devel <alsa-devel@alsa-project.org>; linux-kernel <linux-kernel@vger.kernel.org>; Abaci Robot <abaci@linux.alibaba.com>
主 题:Re: [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error


On 2/16/2022 7:41 AM, Yang Li wrote:
Thanks for Fix Yang!!!
We are going to post complete cleaned patch. Shall we ignore this patch 
for now?
> Eliminate the following coccicheck warning:
> ./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but
> dereferenced.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>   sound/soc/codecs/wcd938x.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
> index 2663fe0bf64f..c46c4bfd84f2 100644
> --- a/sound/soc/codecs/wcd938x.c
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activ
>    struct wcd938x_priv *wcd938x;
>   
>    if (!component) {
> -  dev_err(component->dev, "%s component is NULL\n", __func__);
> +  pr_err("The snd_soc_component is NULL\n");
>     return false;
>    }
>   


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

end of thread, other threads:[~2022-02-17  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16  2:11 [PATCH -next] ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error Yang Li
2022-02-16  2:11 ` Yang Li
2022-02-16 11:33 ` Srinivasa Rao Mandadapu
2022-02-16 11:33   ` Srinivasa Rao Mandadapu
2022-02-17  2:50   ` 回复:[PATCH " Yang.Lee

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.