Subject: Re: [PATCH] fix return values of l2tp_dfs_seq_open()

From: James Chapman <[email-masked]>
Date: Sun, 05 Jun 2011 12:05:25 +0100

On 05/06/2011 11:54, Al Viro wrote:
> More fallout from struct net lifetime rules review: PTR_ERR() is *already*
> negative and failing ->open() should return negatives on failure.
> 
> Signed-off-by: Al Viro <[email-masked]>
> ---
> diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c
> index b8dbae8..7613013 100644
> --- a/net/l2tp/l2tp_debugfs.c
> +++ b/net/l2tp/l2tp_debugfs.c
> @@ -258,7 +258,7 @@ static int l2tp_dfs_seq_open(struct inode *inode, struct file *file)
>  	 */
>  	pd->net = get_net_ns_by_pid(current->pid);
>  	if (IS_ERR(pd->net)) {
> -		rc = -PTR_ERR(pd->net);
> +		rc = PTR_ERR(pd->net);
>  		goto err_free_pd;
>  	}
>  

Whoops. Thanks Al.

Signed-off-by: James Chapman <[email-masked]>

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development