[PATCH] Fix typo in error test

Scott Talbot psyc at stalbot.com
Mon Nov 24 10:27:06 CET 2008


Test variant instead of checking version twice.

Signed-off-by: Scott Talbot <psyc at stalbot.com>
---

 drivers/mfd/pcf50633-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 6d66b52..66a7954 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -502,7 +502,7 @@ static int pcf50633_probe(struct i2c_client *client,
 	}
 
 	variant = pcf50633_reg_read(pcf, 1);
-	if (version < 0) {
+	if (variant < 0) {
 		dev_err(pcf->dev, "Unable to probe pcf50633\n");
 		kfree(pcf);
 		return -ENODEV;




More information about the openmoko-kernel mailing list