Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431226 > unrolled thread

Re: [PATCH v2 2/2] staging: wilc1000: fix error values in wilc_debugfs_init()

Started byGreg KH <gregkh@linuxfoundation.org>
First post2016-06-25 23:40 +0200
Last post2016-06-25 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 2/2] staging: wilc1000: fix error values in  wilc_debugfs_init() Greg KH <gregkh@linuxfoundation.org> - 2016-06-25 23:40 +0200

#1431226 — Re: [PATCH v2 2/2] staging: wilc1000: fix error values in wilc_debugfs_init()

FromGreg KH <gregkh@linuxfoundation.org>
Date2016-06-25 23:40 +0200
SubjectRe: [PATCH v2 2/2] staging: wilc1000: fix error values in wilc_debugfs_init()
Message-ID<rO3t0-2bb-27@gated-at.bofh.it>
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@osg.samsung.com>
> Reviewed-by: Julian Calaby <julian.calaby@gmail.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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web