Commit daf6bdb2 authored by Peter Rosin's avatar Peter Rosin Committed by Greg Kroah-Hartman

i2c: viperboard: return message count on master_xfer success

[ Upstream commit 35cd67a0 ]

Returning zero is wrong in this case.
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Fixes: 174a13aa ("i2c: Add viperboard i2c master driver")
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cbfe697c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment