Skip to content

Commit fa84901

Browse files
committed
In fact, don't use a temporary at all
1 parent 5452515 commit fa84901

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

board/hx20/battery.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ static enum ec_status cmd_charging_limit_control(struct host_cmd_handler_args *a
363363
charging_maximum_level = charging_maximum_level | CHG_LIMIT_OVERRIDE;
364364

365365
if (p->modes & CHG_LIMIT_GET_LIMIT) {
366-
uint8_t max = 0;
367-
system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &max);
368-
r->max_percentage = max;
366+
system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &r->max_percentage);
369367
args->response_size = sizeof(*r);
370368
}
371369

0 commit comments

Comments
 (0)