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: <20160625213632.GB15125@kroah.com>
Date:	Sat, 25 Jun 2016 14:36:32 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Luis de Bethencourt <luisbg@....samsung.com>
Cc:	linux-kernel@...r.kernel.org, johnny.kim@...el.com,
	austin.shin@...el.com, chris.park@...el.com, tony.cho@...el.com,
	glen.lee@...el.com, leo.kim@...el.com,
	linux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
	julian.calaby@...il.com
Subject: Re: [PATCH v2 2/2] staging: wilc1000: fix error values in
 wilc_debugfs_init()

On Thu, Jun 23, 2016 at 01:36:18PM +0100, Luis de Bethencourt wrote:
> If there was an error, returning -EINVAL is more appropriate than -1.
> 
> Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
> Reviewed-by: Julian Calaby <julian.calaby@...il.com>
> ---
>  drivers/staging/wilc1000/wilc_debugfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
> index 48797dc..6252931 100644
> --- a/drivers/staging/wilc1000/wilc_debugfs.c
> +++ b/drivers/staging/wilc1000/wilc_debugfs.c
> @@ -115,7 +115,7 @@ static int __init wilc_debugfs_init(void)
>  
>  	if (!wilc_dir) {
>  		printk("ERR, debugfs create dir\n");
> -		return -1;
> +		return -EINVAL;
>  	}

Same here, don't check.

>  
>  	for (i = 0; i < ARRAY_SIZE(debugfs_info); i++) {
> @@ -129,7 +129,7 @@ static int __init wilc_debugfs_init(void)
>  		if (!debugfs_files) {
>  			printk("ERR fail to create the debugfs file, %s\n", info->name);
>  			debugfs_remove_recursive(wilc_dir);
> -			return -1;
> +			return -EINVAL;

And here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ