ACK: [PATCH] acpi: s3: check for null pointer
ivanhu
ivan.hu at canonical.com
Tue Jun 11 05:44:34 UTC 2019
On 6/10/19 6:57 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The pointer 'klog_diff' can potentially be null, so check for this.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/s3/s3.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
> index 79df1a6c..c754af81 100644
> --- a/src/acpi/s3/s3.c
> +++ b/src/acpi/s3/s3.c
> @@ -551,8 +551,9 @@ static int s3_test_multiple(fwts_framework *fw)
>
> fwts_progress_message(fw, percent, "(Checking logs for errors)");
> klog_diff = fwts_klog_find_changes(klog_pre, klog_post);
> - s3_check_log(fw, klog_diff, &klog_errors, &klog_oopses, &klog_warn_ons,
> - &suspend_too_long, &resume_too_long);
> + if (klog_diff)
> + s3_check_log(fw, klog_diff, &klog_errors, &klog_oopses, &klog_warn_ons,
> + &suspend_too_long, &resume_too_long);
>
> fwts_klog_free(klog_pre);
> fwts_klog_free(klog_post);
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list