[PATCH] ubifs: Remove a redundant null check on pointer lp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

An earlier fix to replace an IS_ERR check on lp with a null check
on lp didn't remove a following null check on lp. The second null
check is redundant and can be removed.

Addresses-Coverity: ("Logically dead code")
Fixes: c770cd5190ba ("ubifs: fix an IS_ERR() vs NULL check")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
 fs/ubifs/gc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index 7cc22d7317ea..465beea52176 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -899,8 +899,6 @@ int ubifs_gc_start_commit(struct ubifs_info *c)
 			err = -ENOMEM;
 			goto out;
 		}
-		if (!lp)
-			break;
 		idx_gc = kmalloc(sizeof(struct ubifs_gced_idx_leb), GFP_NOFS);
 		if (!idx_gc) {
 			err = -ENOMEM;
-- 
2.31.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux