Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09eb45c7 authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

power: smb5-lib: fix mutex deadlock



Fix deadlock in "smblib_uusb_removal" as mutex lock is
acquired twice in the same context.

Change-Id: I3b0b3917be796ed42f9816e4992ec0a59832d7f1
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent c7cf52ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -911,7 +911,7 @@ static void smblib_uusb_removal(struct smb_charger *chg)
	if (rc < 0)
		dev_err(chg->dev, "Couldn't disable secondary charger rc=%d\n",
			rc);
	mutex_lock(&chg->smb_lock);
	mutex_unlock(&chg->smb_lock);

	cancel_delayed_work_sync(&chg->pl_enable_work);