qseecom: Add flush_work based on flag

As INIT_WORK during suspend resume path is
only supported with bus scaling support
hence use the same check for flush_work.

Change-Id: I5172d574a2bc33a1cdba1fead7e6c4208648448c
Signed-off-by: Monika Singh <monising@codeaurora.org>
This commit is contained in:
Monika Singh 2021-02-26 23:47:09 +05:30 committed by Michael Bestas
parent c5394cf277
commit 23d03fa257
No known key found for this signature in database
GPG Key ID: CC95044519BE6669

View File

@ -9755,7 +9755,8 @@ static int qseecom_suspend(struct platform_device *pdev, pm_message_t state)
mutex_unlock(&clk_access_lock);
mutex_unlock(&qsee_bw_mutex);
cancel_work_sync(&qseecom.bw_inactive_req_ws);
if (qseecom.support_bus_scaling)
cancel_work_sync(&qseecom.bw_inactive_req_ws);
return 0;
}