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

Commit 8f6e4435 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Abhijith Desai
Browse files

msm: mdss: fix incorrect mutex unlocking during NOTIFY_UPDATE_STOP



When servicing NOTIFY_UPDATE_STOP command, if the notify object
was uninitialized then mutex lock is obtained on one object but
unlock is done on a different object. This change fixes it.

CRs-Fixed: 1088059
Change-Id: I66cbe48b7f4910228a6af57610a8427fea7fd1f2
Signed-off-by: default avatarNaseer Ahmed <naseer@codeaurora.org>
parent b1c57cce
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -243,9 +243,11 @@ static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
		}
	} else if (notify == NOTIFY_UPDATE_STOP) {
		mutex_lock(&mfd->update.lock);
		if (mfd->update.init_done)
		if (mfd->update.init_done) {
			mutex_unlock(&mfd->update.lock);
			mutex_lock(&mfd->no_update.lock);
			reinit_completion(&mfd->no_update.comp);
		else {
		} else {
			mutex_unlock(&mfd->update.lock);
			pr_err("notify update stop called without init\n");
			return -EINVAL;