|
@@ -656,8 +656,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
|
|
|
i2c_dw_xfer_init(dev);
|
|
|
|
|
|
/* wait for tx to complete */
|
|
|
- ret = wait_for_completion_timeout(&dev->cmd_complete, HZ);
|
|
|
- if (ret == 0) {
|
|
|
+ if (!wait_for_completion_timeout(&dev->cmd_complete, HZ)) {
|
|
|
dev_err(dev->dev, "controller timed out\n");
|
|
|
/* i2c_dw_init implicitly disables the adapter */
|
|
|
i2c_dw_init(dev);
|