mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-13 04:39:36 +02:00
firmware: turris-mox-rwtm: Do not complete if there are no waiters
[ Upstream commit0bafb172b1
] Do not complete the "command done" completion if there are no waiters. This can happen if a wait_for_completion() timed out or was interrupted. Fixes:389711b374
("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9312a63da7
commit
2f4f8d171e
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Turris Mox rWTM firmware driver
|
||||
*
|
||||
* Copyright (C) 2019 Marek Behún <kabel@kernel.org>
|
||||
* Copyright (C) 2019, 2024 Marek Behún <kabel@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/armada-37xx-rwtm-mailbox.h>
|
||||
|
@ -174,6 +174,9 @@ static void mox_rwtm_rx_callback(struct mbox_client *cl, void *data)
|
|||
struct mox_rwtm *rwtm = dev_get_drvdata(cl->dev);
|
||||
struct armada_37xx_rwtm_rx_msg *msg = data;
|
||||
|
||||
if (completion_done(&rwtm->cmd_done))
|
||||
return;
|
||||
|
||||
rwtm->reply = *msg;
|
||||
complete(&rwtm->cmd_done);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user