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

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

Merge "crypto: qce50: Fix unclocked access in unbind path"

parents 8745dfeb 038109f1
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
/*
 * QTI Crypto Engine driver.
 *
 * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-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
@@ -6118,12 +6118,14 @@ EXPORT_SYMBOL(qce_open);
int qce_close(void *handle)
{
	struct qce_device *pce_dev = (struct qce_device *) handle;
	int ret = -1;

	if (handle == NULL)
		return -ENODEV;

	mutex_lock(&qce_iomap_mutex);
	qce_enable_clk(pce_dev);
	ret = qce_enable_clk(pce_dev);
	if (!ret)
		qce_sps_exit(pce_dev);

	if (pce_dev->iobase)
@@ -6137,6 +6139,7 @@ int qce_close(void *handle)
	if (pce_dev->enable_s1_smmu)
		qce_iommu_release_iomapping(pce_dev);

	if (!ret)
		qce_disable_clk(pce_dev);
	__qce_deinit_clk(pce_dev);
	mutex_unlock(&qce_iomap_mutex);