diff mbox

[PM-OPP,2/4] OMAP: Correct the return value check after call into find_device_opp

Message ID 1279000026-24042-3-git-send-email-thara@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thara Gopinath July 13, 2010, 5:47 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
index a06b88d..d88a2e0 100644
--- a/arch/arm/plat-omap/opp.c
+++ b/arch/arm/plat-omap/opp.c
@@ -457,8 +457,10 @@  void opp_init_cpufreq_table(struct device *dev,
 	int i = 0;
 
 	dev_opp = find_device_opp(dev);
-	if (WARN_ON(!dev_opp))
+	if (IS_ERR(dev_opp)) {
+		WARN_ON(1);
 		return;
+	}
 
 	freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) *
 			     (dev_opp->enabled_opp_count + 1), GFP_ATOMIC);