aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/twl-regulator.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 9cf6f59d27bc..88bc32bc31a0 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1189,10 +1189,12 @@ static int __devinit twlreg_probe(struct platform_device *pdev)
1189 initdata = pdev->dev.platform_data; 1189 initdata = pdev->dev.platform_data;
1190 for (i = 0, info = NULL; i < ARRAY_SIZE(twl_of_match); i++) { 1190 for (i = 0, info = NULL; i < ARRAY_SIZE(twl_of_match); i++) {
1191 info = twl_of_match[i].data; 1191 info = twl_of_match[i].data;
1192 if (!info || info->desc.id != id) 1192 if (info && info->desc.id == id)
1193 continue; 1193 break;
1194 break;
1195 } 1194 }
1195 if (i == ARRAY_SIZE(twl_of_match))
1196 return -ENODEV;
1197
1196 drvdata = initdata->driver_data; 1198 drvdata = initdata->driver_data;
1197 if (!drvdata) 1199 if (!drvdata)
1198 return -EINVAL; 1200 return -EINVAL;