diff options
author | Shardar Shariff Md <smohammed@nvidia.com> | 2016-08-31 18:58:41 +0530 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-09-08 22:33:19 +0200 |
commit | 2148c01ccea9203a153eadadf068c1be5a935495 (patch) | |
tree | d4ec3183f0f391590e185922824a8dbdf398c8de /drivers/i2c/busses/i2c-tegra.c | |
parent | 685143a1598b36227250f6c0a90ec234218f58ff (diff) | |
download | talos-op-linux-2148c01ccea9203a153eadadf068c1be5a935495.tar.gz talos-op-linux-2148c01ccea9203a153eadadf068c1be5a935495.zip |
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/busses/i2c-tegra.c')
-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); |