diff mbox

btrfs: Remove unnecessary check for NULL

Message ID 1398430685-15395-1-git-send-email-tklauser@distanz.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Tobias Klauser April 25, 2014, 12:58 p.m. UTC
iput() already checks for the inode being NULL, thus it's unnecessary to
check before calling.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 fs/btrfs/scrub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 0be7799..bd850b5 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -717,8 +717,8 @@  static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx)
 out:
 	if (page)
 		put_page(page);
-	if (inode)
-		iput(inode);
+
+	iput(inode);
 
 	if (ret < 0)
 		return ret;