[PATCH 4/5] mfd: avoid to return failure in 88pm860x

From: Haojian Zhuang
Date: Sun Aug 05 2012 - 12:33:18 EST


While touch field of 88pm860x platform_data isn't assigned, probe
function returns failure. Now update code to only return without
failure since touch field isn't always used in each usage scenario.

Signed-off-by: Haojian Zhuang <haojian.zhuang@xxxxxxxxx>
---
drivers/mfd/88pm860x-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index bde9231..60faf9b 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -551,7 +551,7 @@ static int __devinit device_gpadc_init(struct pm860x_chip *chip,
/* initialize GPADC without activating it */

if (!pdata || !pdata->touch)
- return -EINVAL;
+ return 0;

/* set GPADC MISC1 register */
data = 0;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/