Skip to content

Commit

Permalink
i2c: tegra: Correct error path in probe
Browse files Browse the repository at this point in the history
Commit 497fbe2 ("i2c: tegra: enable multi master mode for tegra210")
enables the Tegra I2C 'div_clk' for adapters using the multi-master mode
during the device probe. Although the probe error path was updated to
disable the clock on probe failure, there is one place after calling
tegra_i2c_init() where the clock will not be disabled on failure. Correct
the error path so that the 'div_clk' is disabled if calling
tegra_i2c_init() fails.

Fixes: 497fbe2 ("i2c: tegra: enable multi master mode for tegra210")

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Jon Hunter authored and Wolfram Sang committed Jul 5, 2016
1 parent 5abe9b2 commit eab0998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
ret = tegra_i2c_init(i2c_dev);
if (ret) {
dev_err(&pdev->dev, "Failed to initialize i2c controller");
goto unprepare_div_clk;
goto disable_div_clk;
}

ret = devm_request_irq(&pdev->dev, i2c_dev->irq,
Expand Down

0 comments on commit eab0998

Please sign in to comment.