scsi: ufs: ufs-qcom: Remove impossible check
authorDan Carpenter <error27@gmail.com>
Mon, 27 Feb 2023 10:07:26 +0000 (13:07 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 6 Mar 2023 23:33:12 +0000 (18:33 -0500)
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.

Link: https://lore.kernel.org/r/Y/yA3niWUcGYgBU8@kili
Fixes: f06fcc7155dc ("scsi: ufs-qcom: add QUniPro hardware support and power optimizations")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c

index 34fc453f3eb1f23c39bebb6695e12641de95edf1..797230ad39396aeec5dc56d34e9959a6d957c6ae 100644 (file)
@@ -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;
                }