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:	Sun, 01 Aug 2010 14:06:38 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Kulikov Vasiliy <segooon@...il.com>
CC:	kernel-janitors@...r.kernel.org,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Tony Lindgren <tony@...mide.com>,
	Cory Maccarrone <darkstar6262@...il.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/7] usb: omap_udc: check return value of proc_create()

Hello.

Kulikov Vasiliy wrote:

> proc_create() may fail, if so return -ENOMEM.

> Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
[...]
> diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
> index f81e4f0..1083216 100644
> --- a/drivers/usb/gadget/omap_udc.c
> +++ b/drivers/usb/gadget/omap_udc.c
> @@ -2544,9 +2544,9 @@ static const struct file_operations proc_ops = {
>  	.release	= single_release,
>  };
>  
> -static void create_proc_file(void)
> +static int create_proc_file(void)
>  {
> -	proc_create(proc_filename, 0, NULL, &proc_ops);
> +	return (proc_create(proc_filename, 0, NULL, &proc_ops) == NULL);

    Parens not needed around the *return* expression.

WBR, Sergei
--
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