summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df2cf95)
raw | patch | inline | side by side (parent: df2cf95)
author | Buddy Liong <a0270631@ti.com> | |
Sun, 28 Feb 2016 00:40:06 +0000 (18:40 -0600) | ||
committer | Buddy Liong <a0270631@ti.com> | |
Tue, 1 Mar 2016 20:15:58 +0000 (14:15 -0600) |
In ivahd_init, when RMAN_init() or RMAN_register() fails, there is
no proper cleanup.
Adding proper cleanup when those functions are failing.
Change-Id: I2a644578cc9721e17129cb243baabc67923ee575
Signed-off-by: Buddy Liong <a0270631@ti.com>
no proper cleanup.
Adding proper cleanup when those functions are failing.
Change-Id: I2a644578cc9721e17129cb243baabc67923ee575
Signed-off-by: Buddy Liong <a0270631@ti.com>
src/ti/framework/dce/ivahd.c | patch | blob | history |
index 352829b03964efa630b3bede33b7100748c97c59..3fa87f25310a48a117fb5ec0592bc9fbcb5f4a58 100644 (file)
ret = RMAN_init();
if( ret != IRES_OK ) {
+ ERROR("RMAN_init is failing ret %d", ret);
+ CERuntime_exit();
goto end;
}
/* Register HDVICP with RMAN if not already registered */
ret = RMAN_register(&IRESMAN_HDVICP, &rman_params);
if((ret != IRES_OK) && (ret != IRES_EEXISTS)) {
- DEBUG("could not register IRESMAN_HDVICP: %d", ret);
+ ERROR("could not register IRESMAN_HDVICP: %d", ret);
+ RMAN_exit();
+ CERuntime_exit();
goto end;
}
*/
ret = RMAN_register(&IRESMAN_TILEDMEMORY, &rman_params);
if((ret != IRES_OK) && (ret != IRES_EEXISTS)) {
- DEBUG("could not register IRESMAN_TILEDMEMORY: %d", ret);
+ ERROR("could not register IRESMAN_TILEDMEMORY: %d", ret);
+ ret = RMAN_unregister(&IRESMAN_HDVICP);
+ if( ret != IRES_OK ) {
+ ERROR("RMAN_unregister on IRESMAN_HDVICP fail with ret %d", ret);
+ }
+ RMAN_exit();
+ CERuntime_exit();
goto end;
}