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

Commit 5d366b9d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: thermal: Revert devm_kzalloc to kzalloc in sensor manager APIs"

parents e391b1a9 a4a4f738
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3879,8 +3879,7 @@ int sensor_mgr_init_threshold(struct device *dev,
	thresh_inp->thresh_ct = (sensor_id == MONITOR_ALL_TSENS) ?
						max_tsens_num : 1;
	thresh_inp->thresh_triggered = false;
	thresh_inp->thresh_list = devm_kzalloc(dev,
					sizeof(struct therm_threshold) *
	thresh_inp->thresh_list = kzalloc(sizeof(struct therm_threshold) *
					thresh_inp->thresh_ct, GFP_KERNEL);
	if (!thresh_inp->thresh_list) {
		pr_err("kzalloc failed for thresh\n");
@@ -3949,7 +3948,7 @@ void sensor_mgr_remove_threshold(struct device *dev,
		sensor_cancel_trip(thresh_ptr->sensor_id,
				&thresh_ptr->threshold[1]);
	}
	devm_kfree(dev, thresh_inp->thresh_list);
	kfree(thresh_inp->thresh_list);
	thresh_inp->thresh_list = NULL;
	thresh_inp->thresh_ct = 0;
	thresh_inp->thresh_triggered = false;