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

Commit ac40b7c7 authored by Taniya Das's avatar Taniya Das Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: osm: Update maximum number of bytes to read from buffer



Currently the number of maximum bytes to be copied from buffer is
incorrectly using the size of buffer. Replace to use the count
which is the maximum number of bytes to be read.

Change-Id: I95ddc99b84a44859bb680e5c3da30eec74394016
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 7911874d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-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
@@ -2691,7 +2691,7 @@ static ssize_t debugfs_trace_method_get(struct file *file, char __user *buf,
	else if (c->trace_method == XOR_PACKET)
		len = snprintf(debug_buf, sizeof(debug_buf), "xor\n");

	rc = simple_read_from_buffer((void __user *) buf, len, ppos,
	rc = simple_read_from_buffer((void __user *) buf, count, ppos,
				     (void *) debug_buf, len);

	mutex_unlock(&debug_buf_mutex);