All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: qcom-geni: remove unnecessary conditions
@ 2022-03-07 12:56 Dan Carpenter
  2022-05-21 10:28 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-03-07 12:56 UTC (permalink / raw)
  To: Andy Gross, Vinod Koul; +Cc: Bjorn Andersson, linux-i2c, kernel-janitors

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(-)

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");
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: qcom-geni: remove unnecessary conditions
  2022-03-07 12:56 [PATCH] i2c: qcom-geni: remove unnecessary conditions Dan Carpenter
@ 2022-05-21 10:28 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-05-21 10:28 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Andy Gross, Vinod Koul, Bjorn Andersson, linux-i2c, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

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!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-21 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 12:56 [PATCH] i2c: qcom-geni: remove unnecessary conditions Dan Carpenter
2022-05-21 10:28 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.