From 363ca9e8369527d0b91fe0db6f863f0845d2b117 Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Fri, 2 Mar 2018 10:03:18 +0530 Subject: [PATCH] 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: Taniya Das --- drivers/clk/qcom/clk-cpu-osm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/clk-cpu-osm.c b/drivers/clk/qcom/clk-cpu-osm.c index 510a9803bd82..68f4afde0d0c 100644 --- a/drivers/clk/qcom/clk-cpu-osm.c +++ b/drivers/clk/qcom/clk-cpu-osm.c @@ -1,5 +1,5 @@ /* - * 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);