summaryrefslogtreecommitdiffstats
path: root/net/kcm/kcmproc.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-07-22 20:04:12 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-25 20:17:16 +0200
commit0a58f474928cbace609fb563295ecb32491b1c4a (patch)
tree5348a22ba86609e3510a83c548eb6067f4ec6118 /net/kcm/kcmproc.c
parentnet: ipv6: Always leave anycast and multicast groups on link down (diff)
downloadlinux-0a58f474928cbace609fb563295ecb32491b1c4a.tar.xz
linux-0a58f474928cbace609fb563295ecb32491b1c4a.zip
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>
Diffstat (limited to 'net/kcm/kcmproc.c')
-rw-r--r--net/kcm/kcmproc.c6
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 {
static int kcm_seq_open(struct inode *inode, struct file *file)
{
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));
- if (err < 0)
- return err;
- return err;
}
static void kcm_format_mux_header(struct seq_file *seq)