diff mbox

spi: spi-fsl-dspi: Fix copy-paste error in dspi_probe

Message ID 20180621132209.GA27215@embeddedor.com (mailing list archive)
State Accepted
Commit 80dc12cdfb9e8966da4f02d6d7accf2cb691caf2
Headers show

Commit Message

Gustavo A. R. Silva June 21, 2018, 1:22 p.m. UTC
It seems that the proper structure field to use in this particular
case is *regmap_pushr* instead of regmap.

Addresses-Coverity-ID: 1470126 ("Copy-paste error")
Fixes: 58ba07ec79e6 ("spi: spi-fsl-dspi: Add support for XSPI mode registers")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/spi/spi-fsl-dspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Esben Haabendal June 21, 2018, 3:27 p.m. UTC | #1
"Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:

> It seems that the proper structure field to use in this particular
> case is *regmap_pushr* instead of regmap.
>
> Addresses-Coverity-ID: 1470126 ("Copy-paste error")
> Fixes: 58ba07ec79e6 ("spi: spi-fsl-dspi: Add support for XSPI mode registers")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/spi/spi-fsl-dspi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
> index 1f85dcd..ff7456b 100644
> --- a/drivers/spi/spi-fsl-dspi.c
> +++ b/drivers/spi/spi-fsl-dspi.c
> @@ -1066,7 +1066,7 @@ static int dspi_probe(struct platform_device *pdev)
>  			dev_err(&pdev->dev,
>  				"failed to init pushr regmap: %ld\n",
>  				PTR_ERR(dspi->regmap_pushr));
> -			ret = PTR_ERR(dspi->regmap);
> +			ret = PTR_ERR(dspi->regmap_pushr);
>  			goto out_master_put;
>  		}
>  	}

Acked-by: Esben Haabendal <eha@deif.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 1f85dcd..ff7456b 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1066,7 +1066,7 @@  static int dspi_probe(struct platform_device *pdev)
 			dev_err(&pdev->dev,
 				"failed to init pushr regmap: %ld\n",
 				PTR_ERR(dspi->regmap_pushr));
-			ret = PTR_ERR(dspi->regmap);
+			ret = PTR_ERR(dspi->regmap_pushr);
 			goto out_master_put;
 		}
 	}