Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448708 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-07-22 20:10 +0200 |
| Last post | 2016-07-25 20:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] kcm: remove redundant -ve error check and return path Colin King <colin.king@canonical.com> - 2016-07-22 20:10 +0200
Re: [PATCH] kcm: remove redundant -ve error check and return path David Miller <davem@davemloft.net> - 2016-07-25 20:20 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-07-22 20:10 +0200 |
| Subject | [PATCH] kcm: remove redundant -ve error check and return path |
| Message-ID | <rXN3A-Qn-33@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
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>
---
net/kcm/kcmproc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index fda7f47..16c2e03 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)
--
2.8.1
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-07-25 20:20 +0200 |
| Message-ID | <rYSDV-7Sa-43@gated-at.bofh.it> |
| In reply to | #1448708 |
From: Colin King <colin.king@canonical.com> Date: Fri, 22 Jul 2016 19:04:12 +0100 > From: Colin Ian King <colin.king@canonical.com> > > 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> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web