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

Commit 1320125a authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: qpnp-fg: fix a potential access lockup



In fg_mem_read() there is an execution path where releasing access to
the fuel gauge sram may fail but the associated rw_lock mutex is not
released.

Fix the potential deadlock.

Change-Id: I08edb83135203dd37114b4bed6aa580defc04210
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 6a27fa9e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ out:
		rc = fg_release_access(chip);
		if (rc) {
			pr_err("failed to set mem access bit\n");
			return -EIO;
			rc = -EIO;
		}
	}