Skip to content

Commit

Permalink
i2c: diolan-u2c: Fix master_xfer return code
Browse files Browse the repository at this point in the history
The master_xfer function returns 0 on success. It should return the number of
successful transactions.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
  • Loading branch information
Guenter Roeck authored and Wolfram Sang committed Aug 18, 2012
1 parent 33ec5e8 commit ab5625c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-diolan-u2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ static int diolan_usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
}
}
}
ret = num;
abort:
sret = diolan_i2c_stop(dev);
if (sret < 0 && ret >= 0)
Expand Down

0 comments on commit ab5625c

Please sign in to comment.