Revert "disp: msm: sde: add event to event_list after register is successful"
This reverts commit 91fc51777c67ddc92d0ba1fcddf6cd149f7a0560. The original fix missed to add the client to list in cases when count is larger than zero and client doesn't need to be deleted from list if msm_register_event fails as it was not added to list yet. Revert this change to upload the correct fix. Change-Id: I00923d65387753b05b6b03efec109c019826f5d5 Signed-off-by: Ping Li <pingli@codeaurora.org>
This commit is contained in:
parent
155b0639d1
commit
76a1d81e9d
@ -1351,6 +1351,11 @@ static int msm_ioctl_register_event(struct drm_device *dev, void *data,
|
||||
* calls add to client list and return.
|
||||
*/
|
||||
count = msm_event_client_count(dev, req_event, false);
|
||||
/* Add current client to list */
|
||||
spin_lock_irqsave(&dev->event_lock, flag);
|
||||
list_add_tail(&client->base.link, &priv->client_event_list);
|
||||
spin_unlock_irqrestore(&dev->event_lock, flag);
|
||||
|
||||
if (count)
|
||||
return 0;
|
||||
|
||||
@ -1363,11 +1368,6 @@ static int msm_ioctl_register_event(struct drm_device *dev, void *data,
|
||||
list_del(&client->base.link);
|
||||
spin_unlock_irqrestore(&dev->event_lock, flag);
|
||||
kfree(client);
|
||||
} else {
|
||||
/* Add current client to list */
|
||||
spin_lock_irqsave(&dev->event_lock, flag);
|
||||
list_add_tail(&client->base.link, &priv->client_event_list);
|
||||
spin_unlock_irqrestore(&dev->event_lock, flag);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user