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

Commit 9480b139 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qseecom : qseecom_scale_bus_bandwidth doesn't check the negative mode"

parents 86cc4d47 bb0d7a51
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
 * QTI Secure Execution Environment Communicator (QSEECOM) driver
 *
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#define pr_fmt(fmt) "QSEECOM: %s: " fmt, __func__
@@ -1933,7 +1934,7 @@ static int qseecom_scale_bus_bandwidth(struct qseecom_dev_handle *data,
		pr_err("copy_from_user failed\n");
		return ret;
	}
	if (req_mode > HIGH) {
	if (req_mode > HIGH || req_mode < QSEECOM_STATE_NOT_READY) {
		pr_err("Invalid bandwidth mode (%d)\n", req_mode);
		return -EINVAL;
	}