diff options
author | Alice Chao <[email protected]> | 2022-06-23 11:50:52 +0800 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2022-06-27 23:17:36 -0400 |
commit | df1ea242e3d702342fd0c7c1a7b9ed6838645a05 (patch) | |
tree | 4bfe2764dfdcdbabac58b45049a3ad23aa5404a2 | |
parent | c64c487d953331df239cf866d178612796e59f93 (diff) |
scsi: ufs: ufs-mediatek: Fix invalid access to vccqx
NULL pointer access issue was found for the regulator released
by ufs_mtk_vreg_fix_vccq(). Simply fix this issue by clearing
the released vreg pointer in ufs_hba struct.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Stanley Chu <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Alice Chao <[email protected]>
Signed-off-by: Stanley Chu <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/ufs/host/ufs-mediatek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index f81a7444f8a6..c958279bdd8f 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -758,6 +758,7 @@ static void ufs_mtk_vreg_fix_vccqx(struct ufs_hba *hba) regulator_disable((*vreg_off)->reg); devm_kfree(hba->dev, (*vreg_off)->name); devm_kfree(hba->dev, *vreg_off); + *vreg_off = NULL; } } |