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>
This commit is contained in:
Colin Ian King 2016-07-22 19:04:12 +01:00 committed by David S. Miller
parent ea06f71764
commit 0a58f47492

View File

@ -88,13 +88,9 @@ struct kcm_proc_mux_state {
static int kcm_seq_open(struct inode *inode, struct file *file) static int kcm_seq_open(struct inode *inode, struct file *file)
{ {
struct kcm_seq_muxinfo *muxinfo = PDE_DATA(inode); struct kcm_seq_muxinfo *muxinfo = PDE_DATA(inode);
int err;
err = seq_open_net(inode, file, &muxinfo->seq_ops, return seq_open_net(inode, file, &muxinfo->seq_ops,
sizeof(struct kcm_proc_mux_state)); sizeof(struct kcm_proc_mux_state));
if (err < 0)
return err;
return err;
} }
static void kcm_format_mux_header(struct seq_file *seq) static void kcm_format_mux_header(struct seq_file *seq)