diff mbox

[4/4] arch/arm/mach-omap2/smartreflex.c: Add missing IS_ERR test

Message ID 1295898922-18822-5-git-send-email-julia@diku.dk (mailing list archive)
State Accepted
Delegated to: Kevin Hilman
Headers show

Commit Message

Julia Lawall Jan. 24, 2011, 7:55 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 77ecebf..d7deadf 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -966,7 +966,7 @@  static int __devexit omap_sr_remove(struct platform_device *pdev)
 	}
 
 	sr_info = _sr_lookup(pdata->voltdm);
-	if (!sr_info) {
+	if (IS_ERR(sr_info)) {
 		dev_warn(&pdev->dev, "%s: omap_sr struct not found\n",
 			__func__);
 		return -EINVAL;