From: chenxing Date: Wed, 19 Jun 2013 03:14:52 +0000 (+0800) Subject: rk3188: dvfs: dvfs_adjust_table_lmtvolt determine whether variables are legitimate X-Git-Tag: firefly_0821_release~6965^2~57 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6cf2ac33fbdf0538621d3c5805a4ff47d18c8aea;p=firefly-linux-kernel-4.4.55.git rk3188: dvfs: dvfs_adjust_table_lmtvolt determine whether variables are legitimate --- diff --git a/arch/arm/mach-rk3188/dvfs.c b/arch/arm/mach-rk3188/dvfs.c index 0aab82f67808..38ea09e8cc05 100755 --- a/arch/arm/mach-rk3188/dvfs.c +++ b/arch/arm/mach-rk3188/dvfs.c @@ -99,6 +99,10 @@ void dvfs_adjust_table_lmtvolt(struct clk *clk, struct cpufreq_frequency_table * { int i = 0; unsigned int maxvolt = 0; + if (IS_ERR(clk) || IS_ERR_OR_NULL(table)) { + DVFS_ERR("%s: clk error OR table error\n", __func__); + return ; + } leakage_level = rk_leakage_val(); printk("DVFS MSG: %s: %s get leakage_level = %d\n", clk->name, __func__, leakage_level);