]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpufreq: mt8173: check return value of regulator_get_voltage() call
authorPi-Cheng Chen <pi-cheng.chen@linaro.org>
Sun, 29 Nov 2015 08:31:37 +0000 (16:31 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Dec 2015 23:27:33 +0000 (00:27 +0100)
commit40be4c3ccbf4078e2f8426a7962879b7a447cde4
tree2dd612083c7b3c680888813713706cf98ec22501
parent93625d52e7a74492416f77fed945ba34e0ae0c18
cpufreq: mt8173: check return value of regulator_get_voltage() call

Sometimes regulator_get_voltage() call returns negative values for
reasons(e.g. underlying I2C bus timeout). Add check for the return
values and fail out early.

Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/mt8173-cpufreq.c