summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-07-31 03:31:42 +0300
committerBryan O'Donoghue <bod@kernel.org>2026-09-29 12:53:46 +0100
commit95f9e9fc9336ca4e8fb4ff0a76ddbde2f60bdb09 (patch)
tree4f9a9317909017ef52b2e9bc8932bce50e6611e0
parent428e6f95e685a06a73868aee95dd94dca7b3a027 (diff)
media: iris: guard against a NULL hfi_sys_ops in the interrupt handler
core->hfi_sys_ops is populated only during core bring-up, once the firmware generation has been detected. iris_vpu_power_on() enables interrupts earlier than that, so an interrupt (for instance a spurious one) that fires in this window makes iris_hfi_isr_handler() unconditionally dereference a NULL core->hfi_sys_ops and panic. Skip the response handler when hfi_sys_ops has not been set up yet; the interrupt is still acknowledged and the line re-enabled. Fixes: d8a6a63372b8 ("media: qcom: iris: merge hfi_response_ops and hfi_command_ops") Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
-rw-r--r--drivers/media/platform/qcom/iris/iris_hfi_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.c b/drivers/media/platform/qcom/iris/iris_hfi_common.c
index 8f04f3793d9a..dad906d03fdc 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_common.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c
@@ -109,7 +109,8 @@ irqreturn_t iris_hfi_isr_handler(int irq, void *data)
iris_vpu_clear_interrupt(core);
mutex_unlock(&core->lock);
- core->hfi_sys_ops->sys_hfi_response_handler(core);
+ if (core->hfi_sys_ops)
+ core->hfi_sys_ops->sys_hfi_response_handler(core);
if (!iris_vpu_watchdog(core, core->intr_status))
enable_irq(irq);