msm: mpm-of: Fix NULL pointer and buffer overflow errors
When traversing the hlist, the driver incorrectly checks for NULL of
list node instead of the loop cursor to return an mpm pin mapping. Fix
by checking the NULL value of the loop cursor before return the MPM pin
mapping.
Also, when the pin corresponds to a bypassed interrupt, there could
potentially be a out of bounds access on the msm_mpm_irqs_m2a array. Fix
by adding a check for Bypass interrupt value before updating the array
with a linux irq mapping.
CRs-fixed: 522680
Change-Id: Ie6bc201a443d1d038f3680af1cc64f5b32fb47a4
Signed-off-by:
Mahesh Sivasubramanian <msivasub@codeaurora.org>
Loading
Please register or sign in to comment