diff mbox series

scsi: ufs: ufs-qcom: remove impossible check

Message ID Y/yA3niWUcGYgBU8@kili (mailing list archive)
State Accepted
Commit fa8d32721a07d1349d963832400e97ebb515aa96
Headers show
Series scsi: ufs: ufs-qcom: remove impossible check | expand

Commit Message

Dan Carpenter Feb. 27, 2023, 10:07 a.m. UTC
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")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 drivers/ufs/host/ufs-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen March 7, 2023, 2:57 a.m. UTC | #1
On Mon, 27 Feb 2023 13:07:26 +0300, Dan Carpenter wrote:

> 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
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 34fc453f3eb1..797230ad3939 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -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;
 		}