mdss: mdp: Prevent accessing uninitialized rot_session_mgr
There are situations where mdss_mdp_rotator_release_all is called and rotator session manager is not initialized. Added error checking to prevent crashing. Change-Id: I104fa88dd41bb4bad3a0402cf6955c85f640e384 Signed-off-by: Terence Hampson <thampson@codeaurora.org>
This commit is contained in:
parent
fe0e12f81c
commit
9c7a81c5b7
1 changed files with 4 additions and 0 deletions
|
@ -978,6 +978,10 @@ int mdss_mdp_rotator_release(struct mdss_mdp_rotator_session *rot)
|
|||
int mdss_mdp_rotator_release_all(void)
|
||||
{
|
||||
struct mdss_mdp_rotator_session *rot;
|
||||
if (!rot_mgr) {
|
||||
pr_debug("rot manager not initialized\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
rot = mdss_mdp_rot_mgr_remove_first();
|
||||
|
|
Loading…
Add table
Reference in a new issue