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

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

Merge "clk: qcom: clk-rcg2: Fix DFS frequency table allocation"

parents a1ae71d5 e86f0371
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2013, 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013, 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/kernel.h>
@@ -1469,7 +1469,7 @@ static int clk_rcg2_dfs_populate_freq_table(struct clk_rcg2 *rcg)
	struct freq_tbl *freq_tbl;
	int i, ret;

	freq_tbl = kcalloc(MAX_PERF_LEVEL, sizeof(*freq_tbl), GFP_KERNEL);
	freq_tbl = kcalloc(MAX_PERF_LEVEL + 1, sizeof(*freq_tbl), GFP_KERNEL);
	if (!freq_tbl)
		return -ENOMEM;
	rcg->freq_tbl = freq_tbl;
@@ -1553,6 +1553,7 @@ static const struct clk_ops clk_rcg2_dfs_ops = {
	.get_parent = clk_rcg2_get_parent,
	.determine_rate = clk_rcg2_dfs_determine_rate,
	.recalc_rate = clk_rcg2_dfs_recalc_rate,
	.list_rate = clk_rcg2_list_rate,
};

static int clk_rcg2_enable_dfs(const struct clk_rcg_dfs_data *data,