diff mbox

[ASoC] fsl_ssi: fix of_property_read_u32_array return value check

Message ID 54F77DAE.20005@maciej.szmigiero.name (mailing list archive)
State Accepted
Commit 90aff15b3e0858eaefdcd390e64849542845d489
Headers show

Commit Message

Maciej S. Szmigiero March 4, 2015, 9:48 p.m. UTC
of_property_read_u32_array returns 0 on success,
so the return value shouldn't be inverted twice,
first on assignment then in condition expression.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>

Comments

Mark Brown March 5, 2015, 1:01 a.m. UTC | #1
On Wed, Mar 04, 2015 at 10:48:30PM +0100, Maciej S. Szmigiero wrote:
> of_property_read_u32_array returns 0 on success,
> so the return value shouldn't be inverted twice,
> first on assignment then in condition expression.
> 
> Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>

Applied, thanks.
diff mbox

Patch

--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1227,7 +1227,7 @@  static int fsl_ssi_imx_probe(struct platform_device *pdev,
 	ssi_private->dma_params_tx.addr = ssi_private->ssi_phys + CCSR_SSI_STX0;
 	ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + CCSR_SSI_SRX0;
 
-	ret = !of_property_read_u32_array(np, "dmas", dmas, 4);
+	ret = of_property_read_u32_array(np, "dmas", dmas, 4);
 	if (ssi_private->use_dma && !ret && dmas[2] == IMX_DMATYPE_SSI_DUAL) {
 		ssi_private->use_dual_fifo = true;
 		/* When using dual fifo mode, we need to keep watermark