Skip to contentSkip to conversation

mfd: tps65090: Return proper error if regmap_init_i2c fails

PATCH In review Axel Lin 3 participants 3 messages Apr 25, 2012 – May 9, 2012 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: tps65090: Return proper error if regmap_init_i2c fails

Return proper error instead of 0 if regmap_init_i2c fails.

---
 drivers/mfd/tps65090.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/tps65090.c +3 -3
index 47f802b..da821d9 100644
@@ -286,10 +286,10 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
 	tps65090->rmap = regmap_init_i2c(tps65090->client,
 		&tps65090_regmap_config);
 	if (IS_ERR(tps65090->rmap)) {
-		dev_err(&client->dev, "regmap_init failed with err: %ld\n",
-			PTR_ERR(tps65090->rmap));
+		ret = PTR_ERR(tps65090->rmap);
+		dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
 		goto err_irq_exit;
-	};
+	}
 
 	ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
 		ARRAY_SIZE(tps65090s), NULL, 0);
Signature · 1 line
1.7.5.4
#1 lore raw

Thanks for the patch.
Acked by: Venu Byravarasu<[email protected]>

Quoted 32 lines

-----Original Message-----
From: Axel Lin [mailto:[email protected]]
Sent: Wednesday, April 25, 2012 7:01 AM
To: [email protected]
Cc: Samuel Ortiz; Venu Byravarasu
Subject: [PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails

Return proper error instead of 0 if regmap_init_i2c fails.

---
 drivers/mfd/tps65090.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/tps65090.c +3 -3
index 47f802b..da821d9 100644
@@ -286,10 +286,10 @@ static int __devinit tps65090_i2c_probe(struct
 i2c_client *client,
 	tps65090->rmap = regmap_init_i2c(tps65090->client,
 		&tps65090_regmap_config);
 	if (IS_ERR(tps65090->rmap)) {
-		dev_err(&client->dev, "regmap_init failed with err: %ld\n",
-			PTR_ERR(tps65090->rmap));
+		ret = PTR_ERR(tps65090->rmap);
+		dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
 		goto err_irq_exit;
-	};
+	}
 
 	ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
Quoted 5 lines

ARRAY_SIZE(tps65090s), NULL, 0);
--
1.7.5.4

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#2 lore raw
In reply to Axel Lin

Hi Axel,

Quoted 6 lines · Axel Lin

Return proper error instead of 0 if regmap_init_i2c fails.

---
 drivers/mfd/tps65090.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch applied, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/