fix warning: variable 'launch_resources' is used uninitialized
This fixes
variable 'launch_resources' is used uninitialized whenever 'if'
condition is false [-Wsometimes-uninitialized]
variable 'launch_resources_size' is used uninitialized whenever
'if' condition is false [-Wsometimes-uninitialized]
Bug: None
Test: The warning is gone.
Change-Id: Ief861c8513f0ea5c420a3dfb6e1aa1afd77d5f26
diff --git a/power/power-8996.c b/power/power-8996.c
index 06a4eb0..8c03b67 100644
--- a/power/power-8996.c
+++ b/power/power-8996.c
@@ -155,6 +155,9 @@
strlen(INTERACTIVE_GOVERNOR)) == 0) { /*HMP boost*/
launch_resources = hmp_launch_resources;
launch_resources_size = sizeof(hmp_launch_resources) / sizeof(hmp_launch_resources[0]);
+ } else {
+ ALOGE("Unsupported governor.");
+ return -1;
}
boost_handle = interaction_with_handle(
boost_handle, duration, launch_resources_size, launch_resources);