diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-07-22 14:04:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-25 14:17:16 -0400 |
commit | 0a58f474928cbace609fb563295ecb32491b1c4a (patch) | |
tree | 5348a22ba86609e3510a83c548eb6067f4ec6118 | |
parent | ea06f7176413e2538d13bb85b65387d0917943d9 (diff) |
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>
-rw-r--r-- | net/kcm/kcmproc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c index fda7f4715c58..16c2e03bd388 100644 --- a/net/kcm/kcmproc.c +++ b/net/kcm/kcmproc.c | |||
@@ -88,13 +88,9 @@ struct kcm_proc_mux_state { | |||
88 | static int kcm_seq_open(struct inode *inode, struct file *file) | 88 | static int kcm_seq_open(struct inode *inode, struct file *file) |
89 | { | 89 | { |
90 | struct kcm_seq_muxinfo *muxinfo = PDE_DATA(inode); | 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 | sizeof(struct kcm_proc_mux_state)); | 93 | sizeof(struct kcm_proc_mux_state)); |
95 | if (err < 0) | ||
96 | return err; | ||
97 | return err; | ||
98 | } | 94 | } |
99 | 95 | ||
100 | static void kcm_format_mux_header(struct seq_file *seq) | 96 | static void kcm_format_mux_header(struct seq_file *seq) |