Skip to contentSkip to conversation

scsi: ufs: fix itnull.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Apr 29, 2021 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: ufs: fix itnull.cocci warnings

From: kernel test robot <[email protected]>

The entry should not be NULL, so drop the NULL test.

Generated by: scripts/coccinelle/iterators/itnull.cocci

---

url:    https://github.com/0day-ci/linux/commits/Daejun-Park/scsi-ufs-Introduce-HPB-feature/20210428-155927
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next

:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago

 ufshpb.c |    6 ------
 1 file changed, 6 deletions(-)
drivers/scsi/ufs/ufshpb.c +0 -6
@@ -403,12 +403,6 @@ static struct ufshpb_region *ufshpb_vict
 	struct ufshpb_region *rgn, *victim_rgn = NULL;
 
 	list_for_each_entry(rgn, &lru_info->lh_lru_rgn, list_lru_rgn) {
-		if (!rgn) {
-			dev_err(&hpb->sdev_ufs_lu->sdev_dev,
-				"%s: no region allocated\n",
-				__func__);
-			return NULL;
-		}
 		if (ufshpb_check_srgns_issue_state(hpb, rgn))
 			continue;