diff --git a/drivers/staging/hilog/hilog.c b/drivers/staging/hilog/hilog.c index 178dcb6dd5b1b4553226ac6e3e0223db90dee53d..1c9deca41949228729946ae29029f5c52aa21348 100644 --- a/drivers/staging/hilog/hilog.c +++ b/drivers/staging/hilog/hilog.c @@ -288,7 +288,8 @@ static void hilog_cover_old_log(size_t buf_len) drop_log_lines++; is_this_time_full = true; is_last_time_full = true; - hilog_buffer_dec(sizeof(header) + header.len); + hilog_buffer_dec(sizeof(header)); + hilog_buffer_dec(header.len); } if (is_last_time_full && !is_this_time_full) { /* so we can only print one log if hilog ring buffer is full in a short time */