提交 35cd67a0 编写于 作者: P Peter Rosin 提交者: Wolfram Sang

i2c: viperboard: return message count on master_xfer success

Returning zero is wrong in this case.
Signed-off-by: NPeter Rosin <peda@axentia.se>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Fixes: 174a13aa ("i2c: Add viperboard i2c master driver")
上级 12d9bbc5
...@@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs, ...@@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs,
} }
mutex_unlock(&vb->lock); mutex_unlock(&vb->lock);
} }
return 0; return num;
error: error:
mutex_unlock(&vb->lock); mutex_unlock(&vb->lock);
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册