From f25b9a9a811989fdb2a866b1073db5a5425fe21c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 9 Apr 2012 22:32:49 +0800 Subject: [PATCH] --- yaml --- r: 302190 b: refs/heads/master c: 5ade39358f0244a0672860766eed92e8c908b805 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/regulator/twl-regulator.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 3d9d0afcd686..3e2ee854c45b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e42a7dc407163dd99ab5741b6fd167877708623 +refs/heads/master: 5ade39358f0244a0672860766eed92e8c908b805 diff --git a/trunk/drivers/regulator/twl-regulator.c b/trunk/drivers/regulator/twl-regulator.c index 9cf6f59d27bc..88bc32bc31a0 100644 --- a/trunk/drivers/regulator/twl-regulator.c +++ b/trunk/drivers/regulator/twl-regulator.c @@ -1189,10 +1189,12 @@ static int __devinit twlreg_probe(struct platform_device *pdev) initdata = pdev->dev.platform_data; for (i = 0, info = NULL; i < ARRAY_SIZE(twl_of_match); i++) { info = twl_of_match[i].data; - if (!info || info->desc.id != id) - continue; - break; + if (info && info->desc.id == id) + break; } + if (i == ARRAY_SIZE(twl_of_match)) + return -ENODEV; + drvdata = initdata->driver_data; if (!drvdata) return -EINVAL;