Skip to contentSkip to conversation

mfd: pcf50633: Init pcf->dev before using it

PATCH Applied Axel Lin 2 participants 3 messages Dec 25, 2012 – Jan 27, 2013 1 message not in the archive Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: pcf50633: Init pcf->dev before using it

Current code uses pcf->dev in the dev_err call before setting it to &client->dev. Fix it.

---
 drivers/mfd/pcf50633-core.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mfd/pcf50633-core.c +2 -3
index 64803f1..d115673 100644
@@ -208,6 +208,8 @@ static int pcf50633_probe(struct i2c_client *client,
 	if (!pcf)
 		return -ENOMEM;
 
+	i2c_set_clientdata(client, pcf);
+	pcf->dev = &client->dev;
 	pcf->pdata = pdata;
 
 	mutex_init(&pcf->lock);
@@ -219,9 +221,6 @@ static int pcf50633_probe(struct i2c_client *client,
 		return ret;
 	}
 
-	i2c_set_clientdata(client, pcf);
-	pcf->dev = &client->dev;
-
 	version = pcf50633_reg_read(pcf, 0);
 	variant = pcf50633_reg_read(pcf, 1);
 	if (version < 0 || variant < 0) {
Signature · 1 line
1.7.9.5
Applied
#1 lore raw

Hi Axel,

Quoted 7 lines · Axel Lin

Current code uses pcf->dev in the dev_err call before setting it to &client->dev. Fix it.

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

Applied to my for-linus branch, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#3 lore raw
In reply to a message not in the archive

Hi Axel,

Quoted 12 lines · Axel Lin

2013/1/22 Samuel Ortiz <[email protected]>

Quoted 10 lines

Hi Axel,

Quoted 7 lines · Axel Lin

Current code uses pcf->dev in the dev_err call before setting it to &client->dev. Fix it.

---
 drivers/mfd/pcf50633-core.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Quoted 6 lines
Quoted 2 lines

Applied to my for-linus branch, thanks.

Hi Samuel,
Seems the patches queued in your for-linus branch does not (yet) appear in linux-next?

for-linus goes to Linus and then they show up in linux-next.

Cheers,
Samuel.

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