OSDN Git Service

mfd: wcd9xxx-irq: check if wcd9xxx_res irq is 0 before using it
authorMeng Wang <mwang@codeaurora.org>
Fri, 13 May 2016 05:57:10 +0000 (13:57 +0800)
committerKyle Yan <kyan@codeaurora.org>
Fri, 8 Jul 2016 18:52:42 +0000 (11:52 -0700)
commitaa0b21c907a888b2c425295675945581302cb95f
tree2c99a5570d027fcb891dce966af572c3a85d750c
parentfeb8b93c026935bd56e970cadb1ce4b04d55081d
mfd: wcd9xxx-irq: check if wcd9xxx_res irq is 0 before using it

During SSR, wcd9xxx_res irq lock is destroyed as part of resource
cleanup. If driver tries to access wcd9xxx_res irq lock before it's
initialized, it could cause crash. Check if wcd9xxx_res irq is 0
before using it to avoid crash.

CRs-Fixed: 1003482
Change-Id: I959caf7b305e965b84e8204168194bbfda72dc52
Signed-off-by: Meng Wang <mwang@codeaurora.org>
drivers/mfd/wcd9xxx-irq.c