ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
Subsystems (3)
PATCH 1/1 ASoC: codec: wcd938x: Fix NULL but dereferenced coccicheck error
Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but dereferenced.
--- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wcd938x.c +1 -1
@@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activstruct 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; }
Signature · 1 line
2.20.1.7.g153144c
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?
Quoted 24 lines
Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but dereferenced.Reported-by Abaci Robot <[email protected]>Fixes 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")Signed-off-by Yang Li <[email protected]>--- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/wcd938x.c +1
-1@@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activstruct 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; }
It's okay for me,thanks.
------------------------------------------------------------------
发件人:Srinivasa Rao Mandadapu <[email protected]>
发送时间:2022年2月16日(星期三) 19:34
收件人:Yang Li <[email protected]>; perex <[email protected]>
抄 送:tiwai <[email protected]>; lgirdwood <[email protected]>; broonie <[email protected]>; alsa-devel <[email protected]>; linux-kernel <[email protected]>; Abaci Robot <[email protected]> 主 题: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?
Quoted 24 lines
Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:4210:21-24: ERROR: component is NULL but dereferenced.Reported-by Abaci Robot <[email protected]>Fixes 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")Signed-off-by Yang Li <[email protected]>--- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/codecs/wcd938x.c +1
-1@@ -4207,7 +4207,7 @@ static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool activstruct 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; }