mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
power: qpnp-smb5: Fix Initialize mutex for PD typec designs
Dump stack is observed when mutex (typec_lock) is locked without initializing it in case of PD supported typec designs. Fix it by initializing the mutex for PD supported typec designs also. Change-Id: I7ee29715651dc001a450d80c49c6cce10f10e837 Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
This commit is contained in:
parent
4c39afb36f
commit
8d77be5b92
1 changed files with 2 additions and 1 deletions
|
|
@ -3490,11 +3490,12 @@ static int smb5_init_typec_class(struct smb5 *chip)
|
|||
struct smb_charger *chg = &chip->chg;
|
||||
int rc = 0;
|
||||
|
||||
mutex_init(&chg->typec_lock);
|
||||
|
||||
/* Register typec class for only non-PD TypeC and uUSB designs */
|
||||
if (!chg->pd_not_supported)
|
||||
return rc;
|
||||
|
||||
mutex_init(&chg->typec_lock);
|
||||
chg->typec_caps.type = TYPEC_PORT_DRP;
|
||||
chg->typec_caps.data = TYPEC_PORT_DRD;
|
||||
chg->typec_partner_desc.usb_pd = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue