qos: Add NULL checking for irq descriptor
Check for NULL for irq descriptor to prevent deferencing an invalid address. The qos value is then ignored as it cannot be associated with the requested irq. Change-Id: I82fdc9b10ffff89032a0f0e9dade42e4c670f4b9 Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
This commit is contained in:
parent
3a7e752617
commit
466165aa64
1 changed files with 5 additions and 1 deletions
|
@ -597,7 +597,11 @@ void pm_qos_add_request(struct pm_qos_request *req,
|
|||
case PM_QOS_REQ_AFFINE_IRQ:
|
||||
if (irq_can_set_affinity(req->irq)) {
|
||||
struct irq_desc *desc = irq_to_desc(req->irq);
|
||||
struct cpumask *mask = desc->irq_data.common->affinity;
|
||||
struct cpumask *mask;
|
||||
|
||||
if (!desc)
|
||||
return;
|
||||
mask = desc->irq_data.common->affinity;
|
||||
|
||||
/* Get the current affinity */
|
||||
cpumask_copy(&req->cpus_affine, mask);
|
||||
|
|
Loading…
Add table
Reference in a new issue