From 23d03fa257af1da4041b4d6bbf63e63dd5ebc8a1 Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Fri, 26 Feb 2021 23:47:09 +0530 Subject: [PATCH] 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 --- drivers/misc/qseecom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c index 9980a4e1cfe6..b29a486758ee 100644 --- a/drivers/misc/qseecom.c +++ b/drivers/misc/qseecom.c @@ -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; }