lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240204203127.1186621-2-andy.shevchenko@gmail.com>
Date: Sun,  4 Feb 2024 22:29:18 +0200
From: andy.shevchenko@...il.com
To: Mark Brown <broonie@...nel.org>,
	linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Vladimir Oltean <olteanv@...il.com>,
	Minjie Du <duminjie@...o.com>,
	Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v2 1/2] spi: fsl-dspi: Preserve error code returned by dmaengine_slave_config()

dmaengine_slave_config() may return different error codes based on
the circumstances. Preserve it instead of shadowing to -EINVAL.

Suggested-by: Vladimir Oltean <olteanv@...il.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
 drivers/spi/spi-fsl-dspi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index c9eae046f66c..0b5ea7a7da71 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -542,7 +542,6 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr)
 	ret = dmaengine_slave_config(dma->chan_rx, &cfg);
 	if (ret) {
 		dev_err(dev, "can't configure rx dma channel\n");
-		ret = -EINVAL;
 		goto err_slave_config;
 	}
 
@@ -550,7 +549,6 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr)
 	ret = dmaengine_slave_config(dma->chan_tx, &cfg);
 	if (ret) {
 		dev_err(dev, "can't configure tx dma channel\n");
-		ret = -EINVAL;
 		goto err_slave_config;
 	}
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ