Skip to content

Commit

Permalink
kcm: remove redundant -ve error check and return path
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Colin Ian King authored and davem330 committed Jul 25, 2016
1 parent ea06f71 commit 0a58f47
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/kcm/kcmproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a58f47

Please sign in to comment.