Skip to content

Commit

Permalink
[PATCH] i2c-ixp4xx: fix ") != 0))" typo
Browse files Browse the repository at this point in the history
i2c_bit_add_bus() returns -E;
-E != 0		=>	err = 1
probe fails with positive error code

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Deepak Saxena <dsaxena@mvista.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Nov 20, 2006
1 parent dfbc9e9 commit a6cd2d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-ixp4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
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);
Expand Down

0 comments on commit a6cd2d9

Please sign in to comment.