scsi: ufs-qcom: Fix null pointer dereference
Validate the existence of pm qos groups before accessing them, to fix null pointer dereference. Change-Id: Iddb96afac87cf3e7a1cc48f04b3c550e81bdae4b Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This commit is contained in:
parent
9e6175fca8
commit
a8de60e7e7
1 changed files with 3 additions and 0 deletions
|
@ -1829,6 +1829,9 @@ static void ufs_qcom_pm_qos_suspend(struct ufs_qcom_host *host)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (!host->pm_qos.groups)
|
||||
return;
|
||||
|
||||
for (i = 0; i < host->pm_qos.num_groups; i++)
|
||||
flush_work(&host->pm_qos.groups[i].unvote_work);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue