Skip to content

Commit 0fdc7d5

Browse files
dongjianmartinkpetersen
authored andcommitted
scsi: ufs: ufs-mediatek: Correct operator & -> &&
The "lpm" and "->enabled" are all boolean. We should be using && rather than the bit operator. Link: https://lore.kernel.org/r/[email protected] Fixes: 488edaf ("scsi: ufs-mediatek: Introduce low-power mode for device power supply") Reviewed-by: Avri Altman <[email protected]> Signed-off-by: dongjian <[email protected]> Signed-off-by: Yue Hu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 2db4215 commit 0fdc7d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/ufs/ufs-mediatek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
911911
if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc)
912912
return;
913913

914-
if (lpm & !hba->vreg_info.vcc->enabled)
914+
if (lpm && !hba->vreg_info.vcc->enabled)
915915
regulator_set_mode(hba->vreg_info.vccq2->reg,
916916
REGULATOR_MODE_IDLE);
917917
else if (!lpm)

0 commit comments

Comments
 (0)