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: <CAGd==06St3ZmLK8J8CWQHATAYY3n3=o-thMsP1TLTg0PpUxA=g@mail.gmail.com>
Date:	Mon, 18 Jul 2016 09:23:15 +0800
From:	Xinliang Liu <xinliang.liu@...aro.org>
To:	weiyj_lk@....com
Cc:	Xinliang Liu <z.liuxinliang@...ilicon.com>,
	Xinwei Kong <kong.kongxinwei@...ilicon.com>,
	Chen Feng <puck.chen@...ilicon.com>,
	David Airlie <airlied@...ux.ie>,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH -next] drm/hisilicon: Fix return value check in ade_dts_parse()

On 13 July 2016 at 20:43,  <weiyj_lk@....com> wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> In case of error, the function devm_clk_get() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check
> should be replaced with IS_ERR().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Hi, thanks. This patch had already applied to drm-hisilicon-next.

> ---
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index 805f432..c3707d4 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -967,21 +967,21 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
>         }
>
>         ctx->ade_core_clk = devm_clk_get(dev, "clk_ade_core");
> -       if (!ctx->ade_core_clk) {
> +       if (IS_ERR(ctx->ade_core_clk)) {
>                 DRM_ERROR("failed to parse clk ADE_CORE\n");
> -               return -ENODEV;
> +               return PTR_ERR(ctx->ade_core_clk);
>         }
>
>         ctx->media_noc_clk = devm_clk_get(dev, "clk_codec_jpeg");
> -       if (!ctx->media_noc_clk) {
> +       if (IS_ERR(ctx->media_noc_clk)) {
>                 DRM_ERROR("failed to parse clk CODEC_JPEG\n");
> -           return -ENODEV;
> +               return PTR_ERR(ctx->media_noc_clk);
>         }
>
>         ctx->ade_pix_clk = devm_clk_get(dev, "clk_ade_pix");
> -       if (!ctx->ade_pix_clk) {
> +       if (IS_ERR(ctx->ade_pix_clk)) {
>                 DRM_ERROR("failed to parse clk ADE_PIX\n");
> -           return -ENODEV;
> +               return PTR_ERR(ctx->ade_pix_clk);
>         }
>
>         return 0;
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ