* [PATCH] i2c: tegra: Correct error path in probe
@ 2016-06-14 20:26 Jon Hunter
[not found] ` <1465936007-18599-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-07-05 15:22 ` Wolfram Sang
0 siblings, 2 replies; 5+ messages in thread
From: Jon Hunter @ 2016-06-14 20:26 UTC (permalink / raw)
To: Laxman Dewangan, Wolfram Sang, Stephen Warren, Thierry Reding,
Alexandre Courbot
Cc: Shardar Shariff Md, linux-i2c, linux-tegra, linux-kernel,
Jon Hunter
Commit 497fbe24987b ("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: 497fbe24987b ("i2c: tegra: enable multi master mode for tegra210")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/i2c/busses/i2c-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 445398c314a3..b126dbaa47e3 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -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,
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1465936007-18599-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] i2c: tegra: Correct error path in probe
[not found] ` <1465936007-18599-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-06-27 9:28 ` Jon Hunter
2016-06-27 9:32 ` Laxman Dewangan
0 siblings, 1 reply; 5+ messages in thread
From: Jon Hunter @ 2016-06-27 9:28 UTC (permalink / raw)
To: Laxman Dewangan, Wolfram Sang, Stephen Warren, Thierry Reding,
Alexandre Courbot
Cc: Shardar Shariff Md, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Hi all,
On 14/06/16 21:26, Jon Hunter wrote:
> Commit 497fbe24987b ("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: 497fbe24987b ("i2c: tegra: enable multi master mode for tegra210")
>
> Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-tegra.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 445398c314a3..b126dbaa47e3 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -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,
Any feedback on this?
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: tegra: Correct error path in probe
2016-06-27 9:28 ` Jon Hunter
@ 2016-06-27 9:32 ` Laxman Dewangan
2016-07-05 13:21 ` Jon Hunter
0 siblings, 1 reply; 5+ messages in thread
From: Laxman Dewangan @ 2016-06-27 9:32 UTC (permalink / raw)
To: Jon Hunter, Wolfram Sang, Stephen Warren, Thierry Reding,
Alexandre Courbot
Cc: Shardar Shariff Md, linux-i2c, linux-tegra, linux-kernel
On Monday 27 June 2016 02:58 PM, Jon Hunter wrote:
> Hi all,
>
> On 14/06/16 21:26, Jon Hunter wrote:
>> @@ -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;
>> }
>>
Yes, this looks correct.
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: tegra: Correct error path in probe
2016-06-27 9:32 ` Laxman Dewangan
@ 2016-07-05 13:21 ` Jon Hunter
0 siblings, 0 replies; 5+ messages in thread
From: Jon Hunter @ 2016-07-05 13:21 UTC (permalink / raw)
To: Wolfram Sang
Cc: Laxman Dewangan, Stephen Warren, Thierry Reding,
Alexandre Courbot, Shardar Shariff Md, linux-i2c, linux-tegra,
linux-kernel
Wolfram,
On 27/06/16 10:32, Laxman Dewangan wrote:
>
> On Monday 27 June 2016 02:58 PM, Jon Hunter wrote:
>> Hi all,
>>
>> On 14/06/16 21:26, Jon Hunter wrote:
>>> @@ -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;
>>> }
>>>
>
> Yes, this looks correct.
>
> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Can you pick this one up?
Cheers
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: tegra: Correct error path in probe
2016-06-14 20:26 [PATCH] i2c: tegra: Correct error path in probe Jon Hunter
[not found] ` <1465936007-18599-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-07-05 15:22 ` Wolfram Sang
1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2016-07-05 15:22 UTC (permalink / raw)
To: Jon Hunter
Cc: Laxman Dewangan, Stephen Warren, Thierry Reding,
Alexandre Courbot, Shardar Shariff Md, linux-i2c, linux-tegra,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 700 bytes --]
On Tue, Jun 14, 2016 at 09:26:46PM +0100, Jon Hunter wrote:
> Commit 497fbe24987b ("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: 497fbe24987b ("i2c: tegra: enable multi master mode for tegra210")
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-05 15:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-14 20:26 [PATCH] i2c: tegra: Correct error path in probe Jon Hunter
[not found] ` <1465936007-18599-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-27 9:28 ` Jon Hunter
2016-06-27 9:32 ` Laxman Dewangan
2016-07-05 13:21 ` Jon Hunter
2016-07-05 15:22 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).