aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@kernel.org>2025-04-18 23:16:35 +0200
committerAndi Shyti <andi@smida.it>2025-05-19 22:23:56 +0200
commit25909e19c22b0f5a78bc7667598f849c86af91bd (patch)
treed29b61a23b458ae52c3dfd04b5fd9983d953bef4
parenti2c: iproc: When there's an error treat it as an error (diff)
downloadwireguard-linux-25909e19c22b0f5a78bc7667598f849c86af91bd.tar.xz
wireguard-linux-25909e19c22b0f5a78bc7667598f849c86af91bd.zip
i2c: iproc: Remove unnecessary double negation
True is true when greater than '0', no need for double negation inside the if statement. Link: https://lore.kernel.org/r/20250418211635.2666234-11-andi.shyti@kernel.org Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
-rw-r--r--drivers/i2c/busses/i2c-bcm-iproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index bd8233ebf6fc..63bc3c8f49d3 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -836,8 +836,8 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c,
struct i2c_msg *msg = &msgs[0];
/* check if bus is busy */
- if (!!(iproc_i2c_rd_reg(iproc_i2c,
- M_CMD_OFFSET) & BIT(M_CMD_START_BUSY_SHIFT))) {
+ if (iproc_i2c_rd_reg(iproc_i2c,
+ M_CMD_OFFSET) & BIT(M_CMD_START_BUSY_SHIFT)) {
dev_warn(iproc_i2c->device, "bus is busy\n");
return -EBUSY;
}