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

Commit ad38209c authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

msm: lmh_lite: Avoid accessing sensor remove API in critical section



The sensor remove API already has semaphore locks
to protect the critical section access. Update the
calls, where this sensor remove API was called inside
the critical section leading to potential deadlock.

CRs-Fixed: 754828
Change-Id: Ia838843ae9d5202b347791df887616c65816f35e
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent f1a9f6d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -742,9 +742,9 @@ static int lmh_sensor_init(struct platform_device *pdev)
	pr_debug("LMH Sensor Init complete\n");
	pr_debug("LMH Sensor Init complete\n");


init_exit:
init_exit:
	up_write(&lmh_sensor_access);
	if (ret)
	if (ret)
		lmh_remove_sensors();
		lmh_remove_sensors();
	up_write(&lmh_sensor_access);


	return ret;
	return ret;
}
}