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]
Date:	Wed, 12 Dec 2012 10:40:45 +0530
From:	Prabhakar Lad <prabhakar.csengg@...il.com>
To:	Cyril Roelandt <tipecaml@...il.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Prabhakar Lad <prabhakar.lad@...com>, mchehab@...hat.com,
	linux-media@...r.kernel.org,
	davinci-linux-open-source@...ux.davincidsp.com
Subject: Re: [PATCH 2/5] media: davinci: fix return value check in vpbe_display_reqbufs().

Hi Cyril,

On Wed, Dec 12, 2012 at 5:54 AM, Cyril Roelandt <tipecaml@...il.com> wrote:
> vb2_dma_contig_init_ctx() returns ERR_PTR and never returns NULL, so IS_ERR
> should be used instead of a NULL check.
>
patch fixing this issue has been already posted with a better fix
https://patchwork.kernel.org/patch/1830231/

Regards,
--Prabhakar Lad

> Signed-off-by: Cyril Roelandt <tipecaml@...il.com>
> ---
>  drivers/media/platform/davinci/vpbe_display.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
> index 2bfde79..2db4eff 100644
> --- a/drivers/media/platform/davinci/vpbe_display.c
> +++ b/drivers/media/platform/davinci/vpbe_display.c
> @@ -1393,7 +1393,7 @@ static int vpbe_display_reqbufs(struct file *file, void *priv,
>         }
>         /* Initialize videobuf queue as per the buffer type */
>         layer->alloc_ctx = vb2_dma_contig_init_ctx(vpbe_dev->pdev);
> -       if (!layer->alloc_ctx) {
> +       if (IS_ERR(layer->alloc_ctx)) {
>                 v4l2_err(&vpbe_dev->v4l2_dev, "Failed to get the context\n");
>                 return -EINVAL;
>         }
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ