diff options
author | Shardar Shariff Md <smohammed@nvidia.com> | 2016-08-31 16:28:41 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-09-08 23:33:19 +0300 |
commit | 2148c01ccea9203a153eadadf068c1be5a935495 (patch) | |
tree | d4ec3183f0f391590e185922824a8dbdf398c8de /drivers/i2c | |
parent | 685143a1598b36227250f6c0a90ec234218f58ff (diff) | |
download | linux-2148c01ccea9203a153eadadf068c1be5a935495.tar.xz |
i2c: tegra: If fifo flush fails return error
During i2c controller initialization, when fifo flush fails return error
instead of returning the error during exit.
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-tegra.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index e93c72aec555..07a39b7c293a 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -494,6 +494,8 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev) i2c_writel(i2c_dev, val, I2C_FIFO_CONTROL); err = tegra_i2c_flush_fifos(i2c_dev); + if (err) + goto err; if (i2c_dev->is_multimaster_mode && i2c_dev->hw->has_slcg_override_reg) i2c_writel(i2c_dev, I2C_MST_CORE_CLKEN_OVR, I2C_CLKEN_OVERRIDE); |