ASoC: wsa881x: Avoid removing of already deleted timer object
Cancel_delayed_work_sync in wsa881x_swr_down function is trying to remove the timer object which is already deleted. Check for pending work before calling cancel_delayed_work_sync to avoid unnecessary removal of timer object which is already deleted. CRs-Fixed: 1065347 Change-Id: I2d173d05642c58451d56d84d9e34ae65a00c1e3c Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
parent
6c104f8d40
commit
0e066fbe47
1 changed files with 2 additions and 1 deletions
|
@ -1305,6 +1305,7 @@ static int wsa881x_swr_down(struct swr_device *pdev)
|
||||||
dev_err(&pdev->dev, "%s: wsa881x is NULL\n", __func__);
|
dev_err(&pdev->dev, "%s: wsa881x is NULL\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
if (delayed_work_pending(&wsa881x->ocp_ctl_work))
|
||||||
cancel_delayed_work_sync(&wsa881x->ocp_ctl_work);
|
cancel_delayed_work_sync(&wsa881x->ocp_ctl_work);
|
||||||
ret = wsa881x_gpio_ctrl(wsa881x, false);
|
ret = wsa881x_gpio_ctrl(wsa881x, false);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue