aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-12-01 08:24:20 +1100
committerDave Chinner <david@fromorbit.com>2014-12-01 08:24:20 +1100
commitd2a5e3c6fccb25234a594bacb056e0b3974faf49 (patch)
treee7ba3c65936adaf6458bf19359b27c975a1b4eee /fs/xfs/xfs_super.c
parentLinux 3.18-rc2 (diff)
downloadlinux-dev-d2a5e3c6fccb25234a594bacb056e0b3974faf49.tar.xz
linux-dev-d2a5e3c6fccb25234a594bacb056e0b3974faf49.zip
xfs: remove unnecessary null checks
The functions xfs_blkdev_put() and xfs_qm_dqrele() test whether their argument is NULL and then return 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> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 9f622feda6a4..95745be3ab47 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -796,8 +796,7 @@ xfs_open_devices(
out_free_ddev_targ:
xfs_free_buftarg(mp, mp->m_ddev_targp);
out_close_rtdev:
- if (rtdev)
- xfs_blkdev_put(rtdev);
+ xfs_blkdev_put(rtdev);
out_close_logdev:
if (logdev && logdev != ddev)
xfs_blkdev_put(logdev);