summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJason-JH.Lin <jason-jh.lin@mediatek.com>2024-04-26 05:01:21 +0300
committerJassi Brar <jassisinghbrar@gmail.com>2024-05-20 06:32:13 +0300
commit747a69a119c469121385543f21c2d08562968ccc (patch)
treed3b7a8216b650a186b655549eb800785c9d7218c /drivers
parentdc48215f4fd97214184ffe229353b9f4a714bf4e (diff)
downloadlinux-747a69a119c469121385543f21c2d08562968ccc.tar.xz
mailbox: mtk-cmdq: Fix pm_runtime_get_sync() warning in mbox shutdown
The return value of pm_runtime_get_sync() in cmdq_mbox_shutdown() will return 1 when pm runtime state is active, and we don't want to get the warning message in this case. So we change the return value < 0 for WARN_ON(). Fixes: 8afe816b0c99 ("mailbox: mtk-cmdq-mailbox: Implement Runtime PM with autosuspend") Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mailbox/mtk-cmdq-mailbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 080d091e28ac..4aa394e91109 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -465,7 +465,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
struct cmdq_task *task, *tmp;
unsigned long flags;
- WARN_ON(pm_runtime_get_sync(cmdq->mbox.dev));
+ WARN_ON(pm_runtime_get_sync(cmdq->mbox.dev) < 0);
spin_lock_irqsave(&thread->chan->lock, flags);
if (list_empty(&thread->task_busy_list))