diff mbox series

i2c: qcom-geni: remove unnecessary conditions

Message ID 20220307125603.GB16710@kili
State Accepted
Commit 2a250d4508597c6dd719db4be7af68575e828f7d
Headers show
Series i2c: qcom-geni: remove unnecessary conditions | expand

Commit Message

Dan Carpenter March 7, 2022, 12:56 p.m. UTC
We know that "ret" is a negative error code at this point so there is
no need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Wolfram Sang May 21, 2022, 10:28 a.m. UTC | #1
On Mon, Mar 07, 2022 at 03:56:03PM +0300, Dan Carpenter wrote:
> We know that "ret" is a negative error code at this point so there is
> no need to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index fc1dcc19f2a1..17915c98c2c4 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -727,16 +727,14 @@  static int setup_gpi_dma(struct geni_i2c_dev *gi2c)
 	if (IS_ERR(gi2c->tx_c)) {
 		ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->tx_c),
 				    "Failed to get tx DMA ch\n");
-		if (ret < 0)
-			goto err_tx;
+		goto err_tx;
 	}
 
 	gi2c->rx_c = dma_request_chan(gi2c->se.dev, "rx");
 	if (IS_ERR(gi2c->rx_c)) {
 		ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->rx_c),
 				    "Failed to get rx DMA ch\n");
-		if (ret < 0)
-			goto err_rx;
+		goto err_rx;
 	}
 
 	dev_dbg(gi2c->se.dev, "Grabbed GPI dma channels\n");