Explorar el Código

fix return values of l2tp_dfs_seq_open()

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 <viro@zeniv.linux.org.uk>
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro hace 14 años
padre
commit
b8f07a0631
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      net/l2tp/l2tp_debugfs.c

+ 1 - 1
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;
 	}