lkml.org 
[lkml]   [2017]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions
    From
    Date
    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

    \
     
     \ /
      Last update: 2017-01-11 15:53    [W:0.022 / U:7.496 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site