Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24a7ea38 authored by Yadu MG's avatar Yadu MG
Browse files

drivers: qcom: boot_marker: Add NULL check for boot_stats



Add NULL check for boot_stats to avoid NULL pointer dereference.

Change-Id: Iba89d17eca5b0584b88fc1b161758b5e672623ca
Signed-off-by: default avatarYadu MG <ymg@codeaurora.org>
parent 11a49af2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -115,6 +115,11 @@ EXPORT_SYMBOL(update_marker);

static void set_bootloader_stats(bool hibernation_restore)
{
	if (IS_ERR_OR_NULL(boot_stats)) {
		pr_err("boot_marker: imem not initialized!\n");
		return;
	}

	spin_lock(&boot_marker_list.slock);
	_create_boot_marker("M - APPSBL Start - ",
		readl_relaxed(&boot_stats->bootloader_start));