Skip to content

Commit

Permalink
i2c: viperboard: return message count on master_xfer success
Browse files Browse the repository at this point in the history
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 174a13a ("i2c: Add viperboard i2c master driver")
  • Loading branch information
Peter Rosin authored and Wolfram Sang committed May 15, 2018
1 parent 12d9bbc commit 35cd67a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-viperboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs,
}
mutex_unlock(&vb->lock);
}
return 0;
return num;
error:
mutex_unlock(&vb->lock);
return error;
Expand Down

0 comments on commit 35cd67a

Please sign in to comment.