Merge "ASoC: wcd-mbhc: Fix null pointer dereference for mbhc"

This commit is contained in:
qctecmdr
2019-10-25 05:38:57 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1055,6 +1055,10 @@ static irqreturn_t wcd_mbhc_mech_plug_detect_irq(int irq, void *data)
struct wcd_mbhc *mbhc = data; struct wcd_mbhc *mbhc = data;
pr_debug("%s: enter\n", __func__); pr_debug("%s: enter\n", __func__);
if (mbhc == NULL) {
pr_err("%s: NULL irq data\n", __func__);
return IRQ_NONE;
}
if (unlikely((mbhc->mbhc_cb->lock_sleep(mbhc, true)) == false)) { if (unlikely((mbhc->mbhc_cb->lock_sleep(mbhc, true)) == false)) {
pr_warn("%s: failed to hold suspend\n", __func__); pr_warn("%s: failed to hold suspend\n", __func__);
r = IRQ_NONE; r = IRQ_NONE;