[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d6670d5-bc35-62cf-81b9-9d41a2f4e803@mentor.com>
Date: Wed, 11 Jan 2017 16:50:57 +0200
From: Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Marc Gonzalez <marc_gonzalez@...madesigns.com>
CC: Guenter Roeck <linux@...ck-us.net>,
Wim Van Sebroeck <wim@...ana.be>,
<linux-watchdog@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Mans Rullgard <mans@...sr.com>,
Thibaud Cornic <thibaud_cornic@...madesigns.com>,
Mark Rutland <mark.rutland@....com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed
functions
Hello Uwe,
On 01/11/2017 04:39 PM, Uwe Kleine-König wrote:
> On Wed, Jan 11, 2017 at 01:31:47PM +0100, Marc Gonzalez wrote:
>> On 11/01/2017 11:52, Guenter Roeck wrote:
>>
>>> On 01/11/2017 01:07 AM, Marc Gonzalez wrote:
>>>
>>>>> @@ -134,12 +134,15 @@ static int tangox_wdt_probe(struct platform_device *pdev)
>>>>> err = clk_prepare_enable(dev->clk);
>>>>> if (err)
>>>>> return err;
>>>>> + err = devm_add_action_or_reset(&pdev->dev,
>>>>> + (void(*)(void *))clk_disable_unprepare,
>>>>> + dev->clk);
>>>>> + if (err)
>>>>> + return err;
>
> This looks wrong. There is no clk_unprepare_disable when
> devm_add_action_or_reset fails.
actually there is a call to clk_disable_unprepare() on error path, you may
take a look at devm_add_action_or_reset() implementation.
Your comment is valid for devm_add_action() function though, but it's not
the case here.
--
With best wishes,
Vladimir
Powered by blists - more mailing lists