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

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

Merge "qseecom: decrease clk_access_cnt"

parents bfb71549 f99808af
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1497,20 +1497,17 @@ static int __qseecom_decrease_clk_ref_count(enum qseecom_ce_hw_instance ce)
	else
		qclk = &qseecom.ce_drv;

	if (qclk->clk_access_cnt > 2) {
	if (qclk->clk_access_cnt > 0) {
		qclk->clk_access_cnt--;
	} else {
		pr_err("Invalid clock ref count %d\n", qclk->clk_access_cnt);
		ret = -EINVAL;
		goto err_dec_ref_cnt;
	}
	if (qclk->clk_access_cnt == 2)
		qclk->clk_access_cnt--;

err_dec_ref_cnt:
	mutex_unlock(&clk_access_lock);
	return ret;
}


static int qseecom_scale_bus_bandwidth_timer(uint32_t mode)
{
	int32_t ret = 0;