Skip to contentSkip to conversation

scsi: ufs: ufs-qcom: remove impossible check

PATCH Applied Dan Carpenter 2 participants 2 messages Feb 27, 2023 – Mar 7, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: ufs: ufs-qcom: remove impossible check

The "dev_req_params" pointer points to inside the middle of a struct so it can't be NULL. Removing this impossible condition is nice because now we don't need to consider the correct error code for that situation.

Fixes f06fcc7155dc ("scsi: ufs-qcom: add QUniPro hardware support and power optimizations")
---
 drivers/ufs/host/ufs-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/host/ufs-qcom.c +1 -1
index 34fc453f3eb1..797230ad3939 100644
@@ -1177,7 +1177,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
 			err = ufs_qcom_clk_scale_down_post_change(hba);
 
 
-		if (err || !dev_req_params) {
+		if (err) {
 			ufshcd_uic_hibern8_exit(hba);
 			return err;
 		}
Signature · 1 line
2.39.1
#1 lore raw
Quoted 5 lines · Dan Carpenter

The "dev_req_params" pointer points to inside the middle of a struct so it can't be NULL. Removing this impossible condition is nice because now we don't need to consider the correct error code for that situation.

Applied to 6.3/scsi-fixes, thanks!

[1/1] scsi: ufs: ufs-qcom: remove impossible check

      https://git.kernel.org/mkp/scsi/c/fa8d32721a07
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering