lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ad23cba.d1763.172507207bb.Coremail.dinghao.liu@zju.edu.cn>
Date:   Tue, 26 May 2020 18:05:49 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Linus Walleij" <linus.walleij@...aro.org>
Cc:     "Kangjie Lu" <kjlu@....edu>, "Jonathan Cameron" <jic23@...nel.org>,
        "Hartmut Knaack" <knaack.h@....de>,
        "Lars-Peter Clausen" <lars@...afoo.de>,
        "Peter Meerwald-Stadler" <pmeerw@...erw.net>,
        linux-iio <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Re: Re: [PATCH] iio: magnetometer: ak8974: Fix runtime PM
 imbalance on error

> What about just moving the pm_runtime_put() until the end
> of the initialization? Right before return 0;
> Then we can keep this nice goto exits as they are.
> 
> Maybe move all these three:
> 
>       pm_runtime_set_autosuspend_delay(&i2c->dev,
>                                          AK8974_AUTOSUSPEND_DELAY);
>         pm_runtime_use_autosuspend(&i2c->dev);
>         pm_runtime_put(&i2c->dev);
> 

Good idea! Thank you for your advice and I will fix this 
in the next version of patch. 

Regards,
Dinghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ