Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kcm: remove redundant -ve error check and return path

The check for a -ve error is redundant, remove it and just
immediately return the return value from the call to
seq_open_net.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Colin Ian King and committed by
David S. Miller
0a58f474 ea06f717

+1 -5
+1 -5
net/kcm/kcmproc.c
··· 88 88 static int kcm_seq_open(struct inode *inode, struct file *file) 89 89 { 90 90 struct kcm_seq_muxinfo *muxinfo = PDE_DATA(inode); 91 - int err; 92 91 93 - err = seq_open_net(inode, file, &muxinfo->seq_ops, 92 + return seq_open_net(inode, file, &muxinfo->seq_ops, 94 93 sizeof(struct kcm_proc_mux_state)); 95 - if (err < 0) 96 - return err; 97 - return err; 98 94 } 99 95 100 96 static void kcm_format_mux_header(struct seq_file *seq)