Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: kirkwood: fix coccicheck warnings

Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Silviu-Mihai Popescu and committed by
Rafael J. Wysocki
cc721c4f 5df60559

+3 -5
+3 -5
drivers/cpufreq/kirkwood-cpufreq.c
··· 175 175 dev_err(&pdev->dev, "Cannot get memory resource\n"); 176 176 return -ENODEV; 177 177 } 178 - priv.base = devm_request_and_ioremap(&pdev->dev, res); 179 - if (!priv.base) { 180 - dev_err(&pdev->dev, "Cannot ioremap\n"); 181 - return -EADDRNOTAVAIL; 182 - } 178 + priv.base = devm_ioremap_resource(&pdev->dev, res); 179 + if (IS_ERR(priv.base)) 180 + return PTR_ERR(priv.base); 183 181 184 182 np = of_find_node_by_path("/cpus/cpu@0"); 185 183 if (!np)