Skip to content
Commit eb737b8f authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Marc Zyngier
Browse files

irqchip/ti-sci-inta: Fix kernel crash if irq_create_fwspec_mapping fail



irq_create_fwspec_mapping() can fail, returning 0 as parent_virq. In this
case vint_desc is going to be NULL in ti_sci_inta_alloc_irq() which will
cause NULL pointer dereference.

Also note that irq_create_fwspec_mapping() returns 'unsigned int' so the
check '<=' was wrong.

Use -EINVAL if irq_create_fwspec_mapping() returned with 0.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent db56c512
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment