[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220319042657.21835-1-xiam0nd.tong@gmail.com>
Date: Sat, 19 Mar 2022 12:26:57 +0800
From: Xiaomeng Tong <xiam0nd.tong@...il.com>
To: jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: alim.akhtar@...sung.com, avri.altman@....com,
daejun7.park@...sung.com, bvanassche@....org, beanhuo@...ron.com,
keosung.park@...sung.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xiaomeng Tong <xiam0nd.tong@...il.com>
Subject: [PATCH] ufs: remove an unneed NULL check on list iterator
The list iterator is always non-NULL so it doesn't need to be checked.
Thus just remove the unnecessary NULL check.
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@...il.com>
---
drivers/scsi/ufs/ufshpb.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index 2d36a0715..a3db0ad60 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -869,12 +869,6 @@ static struct ufshpb_region *ufshpb_victim_lru_info(struct ufshpb_lu *hpb)
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;
--
2.17.1
Powered by blists - more mailing lists