Skip to content
Commit cb5ef3fa authored by Andreas Färber's avatar Andreas Färber Committed by Anthony Liguori
Browse files

tmp105: Fix I2C protocol bug



An early length postincrement in the TMP105's I2C TX path led to
transfers of more than one byte to place the second byte in the third
byte's place within the buffer and the third byte to get discarded.

Fix this by explictly incrementing the length after the checks but
before the callback is called, which again checks the length.

Adjust the Coding Style while at it.

Signed-off-by: default avatarAlex Horn <alex.horn@cs.ox.ac.uk>
Signed-off-by: default avatarAndreas Färber <andreas.faerber@web.de>
Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 6d0b4301
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment