Skip to contentSkip to conversation

i2c-ixp4xx: fix ") != 0))" typo

PATCH New Alexey Dobriyan 1 participant 1 message Nov 15, 2006 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-ixp4xx: fix ") != 0))" typo

i2c_bit_add_bus() returns -E;
-E != 0 => err = 1
probe fails with positive error code

---

 drivers/i2c/busses/i2c-ixp4xx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-ixp4xx.c +2 -1
@@ -137,7 +137,8 @@ static int ixp4xx_i2c_probe(struct platf
 	gpio_line_set(gpio->scl_pin, 0);
 	gpio_line_set(gpio->sda_pin, 0);
 
-	if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
+	err = i2c_bit_add_bus(&drv_data->adapter);
+	if (err != 0)
 		printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id);
 
 		kfree(drv_data);