]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: iproc: Remove unnecessary double negation
authorAndi Shyti <andi.shyti@kernel.org>
Fri, 18 Apr 2025 21:16:35 +0000 (23:16 +0200)
committerAndi Shyti <andi@smida.it>
Mon, 19 May 2025 20:23:56 +0000 (22:23 +0200)
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>
drivers/i2c/busses/i2c-bcm-iproc.c

index bd8233ebf6fc17680c40ebb4828eff6e4afaa401..63bc3c8f49d3d28f3ec2b767b2df9e53d40ba714 100644 (file)
@@ -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;
        }