Skip to content

Commit 747a69a

Browse files
Jason-JH.LinJassi Brar
authored andcommitted
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: 8afe816 ("mailbox: mtk-cmdq-mailbox: Implement Runtime PM with autosuspend") Signed-off-by: Jason-JH.Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent dc48215 commit 747a69a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/mtk-cmdq-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
465465
struct cmdq_task *task, *tmp;
466466
unsigned long flags;
467467

468-
WARN_ON(pm_runtime_get_sync(cmdq->mbox.dev));
468+
WARN_ON(pm_runtime_get_sync(cmdq->mbox.dev) < 0);
469469

470470
spin_lock_irqsave(&thread->chan->lock, flags);
471471
if (list_empty(&thread->task_busy_list))

0 commit comments

Comments
 (0)