From af4be8e10740b494bdb78b1d9d5c4c9ac744bca5 Mon Sep 17 00:00:00 2001 From: Maulik Shah Date: Sun, 4 Jul 2021 12:51:45 +0530 Subject: [PATCH] drivers: rpmh: Always bug_on() upon timeout in rpmh_write_batch() rpmh_rsc_debug() can race with tcs_tx_done() interrupt handler and may not see any tcs busy and hence won't do bug_on(). Later it may go ahead and free() the request which interrupt handler is processing. Lets always bug_on() upon timeout. Change-Id: I238a6a3639077850df158cb1f0190656e014bb57 Signed-off-by: Maulik Shah --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index 33caa8e59f0d..4eb0fa655997 100644 --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -485,8 +485,7 @@ int rpmh_write_batch(const struct device *dev, enum rpmh_state state, * we've returned from this function. */ rpmh_rsc_debug(ctrlr_to_drv(ctrlr), &compls[i]); - ret = -ETIMEDOUT; - goto exit; + BUG_ON(1); } }