File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
drivers/platform/x86/hp/hp-bioscfg Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
136
136
u32 size ;
137
137
u32 int_value = 0 ;
138
138
int elem ;
139
+ int olist_elem ;
139
140
int reqs ;
140
141
int eloc ;
141
142
char * tmpstr = NULL ;
@@ -147,10 +148,7 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
147
148
if (!order_obj )
148
149
return - EINVAL ;
149
150
150
- for (elem = 1 , eloc = 1 ; elem < order_obj_count ; elem ++ , eloc ++ ) {
151
- /* ONLY look at the first ORDERED_ELEM_CNT elements */
152
- if (eloc == ORD_ELEM_CNT )
153
- goto exit_list ;
151
+ for (elem = 1 , eloc = 1 ; eloc < ORD_ELEM_CNT ; elem ++ , eloc ++ ) {
154
152
155
153
switch (order_obj [elem ].type ) {
156
154
case ACPI_TYPE_STRING :
@@ -277,10 +275,10 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
277
275
tmpstr ,
278
276
sizeof (ordered_list_data -> elements [0 ]));
279
277
280
- for (elem = 1 ; elem < MAX_ELEMENTS_SIZE && part ; elem ++ ) {
281
- strscpy (ordered_list_data -> elements [elem ],
278
+ for (olist_elem = 1 ; olist_elem < MAX_ELEMENTS_SIZE && part ; olist_elem ++ ) {
279
+ strscpy (ordered_list_data -> elements [olist_elem ],
282
280
part ,
283
- sizeof (ordered_list_data -> elements [elem ]));
281
+ sizeof (ordered_list_data -> elements [olist_elem ]));
284
282
part = strsep (& part_tmp , SEMICOLON_SEP );
285
283
}
286
284
You can’t perform that action at this time.
0 commit comments