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

Commit 479defc5 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

drm/msm: check rsc client before rsc state update



Validate rsc client pointer before updating rsc state
in sde power handler.

Change-Id: Iea17f65cc4f21dcce140e4d194f4acbb5563f3dd
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 5f78b91f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ static void sde_power_event_trigger_locked(struct sde_power_handle *phandle,
static int sde_power_rsc_update(struct sde_power_handle *phandle, bool enable)
{
	u32 rsc_state;
	int ret = 0;

	/* creates the rsc client on the first enable */
	if (!phandle->rsc_client_init) {
@@ -59,8 +60,11 @@ static int sde_power_rsc_update(struct sde_power_handle *phandle, bool enable)

	rsc_state = enable ? SDE_RSC_CLK_STATE : SDE_RSC_IDLE_STATE;

	return sde_rsc_client_state_update(phandle->rsc_client,
	if (phandle->rsc_client)
		ret = sde_rsc_client_state_update(phandle->rsc_client,
			rsc_state, NULL, -1);

	return ret;
}

struct sde_power_client *sde_power_client_create(