|
@@ -371,7 +371,7 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
|
|
|
int len, error_log_length;
|
|
|
|
|
|
error_log_length = 8 + rtas_error_extended_log_length(h);
|
|
|
- len = max_t(int, error_log_length, RTAS_ERROR_LOG_MAX);
|
|
|
+ len = min_t(int, error_log_length, RTAS_ERROR_LOG_MAX);
|
|
|
memset(global_mce_data_buf, 0, RTAS_ERROR_LOG_MAX);
|
|
|
memcpy(global_mce_data_buf, h, len);
|
|
|
errhdr = (struct rtas_error_log *)global_mce_data_buf;
|