Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1262572 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2015-11-04 21:30 +0100 |
| Last post | 2015-11-13 15:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] GFS2: Delete an unnecessary check before the function call "iput" SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-04 21:30 +0100
Re: [PATCH] GFS2: Delete an unnecessary check before the function call "iput" Bob Peterson <rpeterso@redhat.com> - 2015-11-13 15:10 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2015-11-04 21:30 +0100 |
| Subject | [PATCH] GFS2: Delete an unnecessary check before the function call "iput" |
| Message-ID | <qrcQW-5hE-9@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Wed, 4 Nov 2015 21:23:43 +0100 The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- fs/gfs2/ops_fstype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index baab99b..1f9de17 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -910,8 +910,7 @@ fail_qc_i: fail_ut_i: iput(sdp->sd_sc_inode); fail: - if (pn) - iput(pn); + iput(pn); return error; } -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Bob Peterson <rpeterso@redhat.com> |
|---|---|
| Date | 2015-11-13 15:10 +0100 |
| Subject | Re: [PATCH] GFS2: Delete an unnecessary check before the function call "iput" |
| Message-ID | <qund8-7qr-21@gated-at.bofh.it> |
| In reply to | #1262572 |
----- Original Message ----- > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Wed, 4 Nov 2015 21:23:43 +0100 > > The iput() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > fs/gfs2/ops_fstype.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c > index baab99b..1f9de17 100644 > --- a/fs/gfs2/ops_fstype.c > +++ b/fs/gfs2/ops_fstype.c > @@ -910,8 +910,7 @@ fail_qc_i: > fail_ut_i: > iput(sdp->sd_sc_inode); > fail: > - if (pn) > - iput(pn); > + iput(pn); > return error; > } > > -- > 2.6.2 > > Hi Markus, ACK, I'll save this patch and push it after the current merge window closed. Regards, Bob Peterson Red Hat File Systems -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web