Re: [patch] ASoC: fsl: add an error check

2015-06-10 Thread Nicolin Chen
On Wed, Jun 10, 2015 at 06:37:23PM +0300, Dan Carpenter wrote:
 My static checker complains that:
 
   sound/soc/fsl/imx-wm8962.c:196 imx_wm8962_probe() warn:
   we tested 'ret' before and it was 'false'
 
 The intent was that we use ret to check imx_audmux_v2_configure_port().
 
 Fixes: 8de2ae2a7f1f ('ASoC: fsl: add imx-wm8962 machine driver')
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Could you please use an subject like:
ASoC: imx-wm8962: Add a missing error check
(Since it only applies to this file)

Otherwise, Acked-by: Nicolin Chen nicoleots...@gmail.com

Thank you indeed for the fix
Nicolin

 ---
 I assume checking for an error here will not change anything but I have
 not tested this patch.
 
 diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
 index cd146d4..b38b98c 100644
 --- a/sound/soc/fsl/imx-wm8962.c
 +++ b/sound/soc/fsl/imx-wm8962.c
 @@ -190,7 +190,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
   dev_err(pdev-dev, audmux internal port setup failed\n);
   return ret;
   }
 - imx_audmux_v2_configure_port(ext_port,
 + ret = imx_audmux_v2_configure_port(ext_port,
   IMX_AUDMUX_V2_PTCR_SYN,
   IMX_AUDMUX_V2_PDCR_RXDSEL(int_port));
   if (ret) {
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[patch] ASoC: fsl: add an error check

2015-06-10 Thread Dan Carpenter
My static checker complains that:

sound/soc/fsl/imx-wm8962.c:196 imx_wm8962_probe() warn:
we tested 'ret' before and it was 'false'

The intent was that we use ret to check imx_audmux_v2_configure_port().

Fixes: 8de2ae2a7f1f ('ASoC: fsl: add imx-wm8962 machine driver')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
I assume checking for an error here will not change anything but I have
not tested this patch.

diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index cd146d4..b38b98c 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx-wm8962.c
@@ -190,7 +190,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
dev_err(pdev-dev, audmux internal port setup failed\n);
return ret;
}
-   imx_audmux_v2_configure_port(ext_port,
+   ret = imx_audmux_v2_configure_port(ext_port,
IMX_AUDMUX_V2_PTCR_SYN,
IMX_AUDMUX_V2_PDCR_RXDSEL(int_port));
if (ret) {
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [patch] ASoC: fsl: add an error check

2015-06-10 Thread Dan Carpenter
 Could you please use an subject like:
 ASoC: imx-wm8962: Add a missing error check
 (Since it only applies to this file)
 

I have been meaning to say something about this.

This is sort of a recurrent problem for me because I'm often the first
person to touch a driver after it's added.  I just copied your patch
prefix from 8de2ae2a7f1f ('ASoC: fsl: add imx-wm8962 machine driver').
Really you should also have used ASoC: imx-wm8962: as well.

This is the third new driver today where I have faced this situation.

regards,
dan carpenter

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [patch] ASoC: fsl: add an error check

2015-06-10 Thread Mark Brown
On Wed, Jun 10, 2015 at 06:37:23PM +0300, Dan Carpenter wrote:
 My static checker complains that:
 
   sound/soc/fsl/imx-wm8962.c:196 imx_wm8962_probe() warn:
   we tested 'ret' before and it was 'false'

Applied, thanks.


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev