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

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

Merge "devfreq: spdm: Fix bad pointer access"

parents 7817a5f8 4317c650
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -286,6 +286,14 @@ static int gov_spdm_hyp_eh(struct devfreq *devfreq, unsigned int event,
		if (hvc_status) {
			pr_err("HVC command %u failed with error %u",
				(int)desc.arg[0], hvc_status);
			mutex_lock(&devfreqs_lock);
			/*
			 * the spdm device probe will fail so remove it from
			 * the list  to prevent accessing a deleted pointer in
			 * the future
			 * */
			list_del(&spdm_data->list);
			mutex_unlock(&devfreqs_lock);
			return -EINVAL;
		}
		devfreq_monitor_start(devfreq);