Skip to content

Commit ccd7e49

Browse files
committed
Merge tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Kevin Hilman <[email protected]> via Tony Lindgren: OMAP PM related fixes for v3.7-rc * tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: SmartReflex: fix error path in init function ARM: OMAP: SmartReflex: select CONFIG_POWER_SUPPLY in Kconfig ARM: OMAP2+: PM: fix return value check in omap2_set_init_voltage() ARM: OMAP2+: SmartReflex: fix return value check in sr_dev_init() ARM: OMAP: omap_device: fix return value check in omap_device_build_ss() ARM: OMAP: fix return value check in beagle_opp_init()
2 parents aa8bd59 + fce680e commit ccd7e49

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

arch/arm/mach-omap2/board-omap3beagle.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static void __init beagle_opp_init(void)
461461
mpu_dev = omap_device_get_by_hwmod_name("mpu");
462462
iva_dev = omap_device_get_by_hwmod_name("iva");
463463

464-
if (!mpu_dev || !iva_dev) {
464+
if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
465465
pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
466466
__func__, mpu_dev, iva_dev);
467467
return;

arch/arm/mach-omap2/pm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
177177
}
178178

179179
voltdm = voltdm_lookup(vdd_name);
180-
if (IS_ERR(voltdm)) {
180+
if (!voltdm) {
181181
pr_err("%s: unable to get vdd pointer for vdd_%s\n",
182182
__func__, vdd_name);
183183
goto exit;

arch/arm/mach-omap2/sr_device.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
122122
sr_data->senp_mod = 0x1;
123123

124124
sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name);
125-
if (IS_ERR(sr_data->voltdm)) {
125+
if (!sr_data->voltdm) {
126126
pr_err("%s: Unable to get voltage domain pointer for VDD %s\n",
127127
__func__, sr_dev_attr->sensor_voltdm_name);
128128
goto exit;

arch/arm/plat-omap/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ config OMAP_DEBUG_LEDS
4949
config POWER_AVS_OMAP
5050
bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2"
5151
depends on POWER_AVS && (ARCH_OMAP3 || ARCH_OMAP4) && PM
52+
select POWER_SUPPLY
5253
help
5354
Say Y to enable AVS(Adaptive Voltage Scaling)
5455
support on OMAP containing the version 1 or

arch/arm/plat-omap/omap_device.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ struct platform_device __init *omap_device_build_ss(const char *pdev_name, int p
725725
dev_set_name(&pdev->dev, "%s", pdev->name);
726726

727727
od = omap_device_alloc(pdev, ohs, oh_cnt, pm_lats, pm_lats_cnt);
728-
if (!od)
728+
if (IS_ERR(od))
729729
goto odbs_exit1;
730730

731731
ret = platform_device_add_data(pdev, pdata, pdata_len);

drivers/power/avs/smartreflex.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
930930
if (!sr_info->base) {
931931
dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
932932
ret = -ENOMEM;
933-
goto err_release_region;
933+
goto err_free_name;
934934
}
935935

936936
if (irq)
@@ -969,7 +969,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
969969
dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
970970
__func__);
971971
ret = PTR_ERR(sr_info->dbg_dir);
972-
goto err_free_name;
972+
goto err_debugfs;
973973
}
974974

975975
(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
@@ -1013,11 +1013,11 @@ static int __init omap_sr_probe(struct platform_device *pdev)
10131013

10141014
err_debugfs:
10151015
debugfs_remove_recursive(sr_info->dbg_dir);
1016-
err_free_name:
1017-
kfree(sr_info->name);
10181016
err_iounmap:
10191017
list_del(&sr_info->node);
10201018
iounmap(sr_info->base);
1019+
err_free_name:
1020+
kfree(sr_info->name);
10211021
err_release_region:
10221022
release_mem_region(mem->start, resource_size(mem));
10231023
err_free_devinfo:

0 commit comments

Comments
 (0)