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

Commit d7726a7d authored by Runmin Wang's avatar Runmin Wang
Browse files

soc: qcom: pil: Initialize the sysmon data correctly



Data structure of sysmon_qmi_data needs to be initialized properly
before added to the sysmon_list.

Change-Id: I872034dd80b93fea8477c0776f8839720657a253
Signed-off-by: default avatarRunmin Wang <runminw@codeaurora.org>
parent 8ecd48cc
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -641,16 +641,16 @@ int sysmon_notifier_register(struct subsys_desc *desc)
	if (!data)
		return -ENOMEM;

	if (data->instance_id <= 0) {
		pr_debug("SSCTL instance id not defined\n");
		goto add_list;
	}

	data->name = desc->name;
	data->instance_id = desc->ssctl_instance_id;
	data->legacy_version = false;
	data->connected = false;

	if (data->instance_id <= 0) {
		pr_debug("SSCTL instance id not defined\n");
		goto add_list;
	}

	init_completion(&data->ind_recv);

	rc = qmi_handle_init(&data->clnt_handle,