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] [thread-next>] [day] [month] [year] [list]
Message-ID: <85657433-659c-ca96-b77b-697eb8b9d702@st.com>
Date:   Mon, 25 May 2020 12:41:18 +0000
From:   Fabien DESSENNE <fabien.dessenne@...com>
To:     Dinghao Liu <dinghao.liu@....edu.cn>, "kjlu@....edu" <kjlu@....edu>
CC:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: bdisp: Fix runtime PM imbalance on error

Hi,

Looks good to me.

Reviewed-by: Fabien Dessenne <fabien.dessenne@...com>

BR

Fabien


On 21/05/2020 12:00 pm, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> ---
>   drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> index af2d5eb782ce..e1d150584bdc 100644
> --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> @@ -1371,7 +1371,7 @@ static int bdisp_probe(struct platform_device *pdev)
>   	ret = pm_runtime_get_sync(dev);
>   	if (ret < 0) {
>   		dev_err(dev, "failed to set PM\n");
> -		goto err_dbg;
> +		goto err_pm;
>   	}
>   
>   	/* Filters */
> @@ -1399,7 +1399,6 @@ static int bdisp_probe(struct platform_device *pdev)
>   	bdisp_hw_free_filters(bdisp->dev);
>   err_pm:
>   	pm_runtime_put(dev);
> -err_dbg:
>   	bdisp_debugfs_remove(bdisp);
>   err_v4l2:
>   	v4l2_device_unregister(&bdisp->v4l2_dev);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ