Recent changes to trf7970a_irq() added a couple return
paths that don't unlock the mutex that is locked when
the routine is entered. Fix this by ensuring the mutex
is always unlocked before returning.
Signed-off-by: Mark A. Greer <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
TRF7970A_SPECIAL_FCN_REG1,
TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL);
if (ret)
- return ret;
+ goto err_unlock_exit;
trf->special_fcn_reg1 =
TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL;
ret = trf7970a_write(trf, TRF7970A_ISO_CTRL,
iso_ctrl);
if (ret)
- return ret;
+ goto err_unlock_exit;
trf->iso_ctrl = iso_ctrl;
}
__func__, trf->state);
}
+err_unlock_exit:
mutex_unlock(&trf->lock);
return IRQ_HANDLED;
}