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: <d315bd2d-6f8d-592f-b24e-15ee34ca22d8@linaro.org>
Date:   Tue, 26 Apr 2022 01:23:38 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     cgel.zte@...il.com
Cc:     airlied@...ux.ie, angelogioacchino.delregno@...labora.com,
        dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        lv.ruyi@....com.cn, quic_abhinavk@...cinc.com,
        quic_mkrishn@...cinc.com, sean@...rly.run, swboyd@...omium.org,
        vulab@...as.ac.cn, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH v2] drm: msm: fix error check return value of
 irq_of_parse_and_map()

On 24/04/2022 06:19, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>
> 
> The irq_of_parse_and_map() function returns 0 on failure, and does not
> return an negative value.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>

> ---
> v2: don't print irq, and return ERR_PTR(-EINVAL)
> ---
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> index 3b92372e7bdf..44e395e59df9 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> @@ -570,9 +570,9 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
>   	}
>   
>   	irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> -	if (irq < 0) {
> -		ret = irq;
> -		DRM_DEV_ERROR(&pdev->dev, "failed to get irq: %d\n", ret);
> +	if (!irq) {
> +		ret = -EINVAL;
> +		DRM_DEV_ERROR(&pdev->dev, "failed to get irq\n");
>   		goto fail;
>   	}
>   


-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ