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

Commit 343f7e30 authored by Taniya Das's avatar Taniya Das
Browse files

clk: msm: 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: I797c4dc0af626e347dfef43a754d0c469585ba55
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 4be74d4c
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
@@ -2868,7 +2868,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);