during a check of the current git head of the linux kernel with the static code analysis tool cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page) the tool discovered a not initialized variable in linux-2.6/arch/arm/mach-omap2/pm44xx.c. This happens if the preprocessor command -DCONFIG_PM and -DCONFIG_SUSPEND is not set! Here is the code snippet to illustrate: static int __init omap4_pm_init(void) { int ret; if (!cpu_is_omap44xx()) return -ENODEV; pr_err("Power Management for TI OMAP4.\n"); #ifdef CONFIG_PM ret = pwrdm_for_each(pwrdms_setup, NULL); if (ret) { pr_err("Failed to setup powerdomains\n"); goto err2; } #endif #ifdef CONFIG_SUSPEND suspend_set_ops(&omap_pm_ops); #endif /* CONFIG_SUSPEND */ err2: return ret; } Best regards Ettl Martin
posted patch - http://marc.info/?l=linux-omap&m=129998746402420&w=2
A patch referencing this bug report has been merged in v3.0-rc1: commit 34549009a1a48e9212508aa32a90281e682c52b1 Author: Nishanth Menon <nm@ti.com> Date: Wed Apr 27 06:13:05 2011 -0700 OMAP4: PM: remove redundant #ifdef CONFIG_PM