Skip to content

Commit 2a250d4

Browse files
Dan Carpenterwsakernel
authored andcommitted
i2c: qcom-geni: remove unnecessary conditions
We know that "ret" is a negative error code at this point so there is no need to check. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 550b113 commit 2a250d4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/i2c/busses/i2c-qcom-geni.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,14 @@ static int setup_gpi_dma(struct geni_i2c_dev *gi2c)
727727
if (IS_ERR(gi2c->tx_c)) {
728728
ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->tx_c),
729729
"Failed to get tx DMA ch\n");
730-
if (ret < 0)
731-
goto err_tx;
730+
goto err_tx;
732731
}
733732

734733
gi2c->rx_c = dma_request_chan(gi2c->se.dev, "rx");
735734
if (IS_ERR(gi2c->rx_c)) {
736735
ret = dev_err_probe(gi2c->se.dev, PTR_ERR(gi2c->rx_c),
737736
"Failed to get rx DMA ch\n");
738-
if (ret < 0)
739-
goto err_rx;
737+
goto err_rx;
740738
}
741739

742740
dev_dbg(gi2c->se.dev, "Grabbed GPI dma channels\n");

0 commit comments

Comments
 (0)