All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices
@ 2013-12-16 12:01 Laszlo Papp
  2013-12-16 17:07 ` Lee Jones
  0 siblings, 1 reply; 16+ messages in thread
From: Laszlo Papp @ 2013-12-16 12:01 UTC (permalink / raw)
  To: sameo, lee.jones; +Cc: linux-kernel, Laszlo Papp

Signed-off-by: Laszlo Papp <lpapp@kde.org>
---
 drivers/mfd/max8997.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 791aea3..ace1a2b 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -227,19 +227,19 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	pm_runtime_set_active(max8997->dev);
 
 	max8997_irq_init(max8997);
-
-	mfd_add_devices(max8997->dev, -1, max8997_devs,
+	ret = mfd_add_devices(max8997->dev, -1, max8997_devs,
 			ARRAY_SIZE(max8997_devs),
 			NULL, 0, NULL);
+	if (ret < 0) {
+		dev_err(max8997->dev, "cannot add mfd cells\n");
+		goto err_mfd;
+	}
 
 	/*
 	 * TODO: enable others (flash, muic, rtc, battery, ...) and
 	 * check the return value
 	 */
 
-	if (ret < 0)
-		goto err_mfd;
-
 	/* MAX8997 has a power button input. */
 	device_init_wakeup(max8997->dev, pdata->wakeup);
 
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices
@ 2013-12-16 12:01 Laszlo Papp
  0 siblings, 0 replies; 16+ messages in thread
From: Laszlo Papp @ 2013-12-16 12:01 UTC (permalink / raw)
  To: sameo, lee.jones; +Cc: linux-kernel, Laszlo Papp

Signed-off-by: Laszlo Papp <lpapp@kde.org>
---
 drivers/mfd/max8997.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 791aea3..c7cc235 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -227,19 +227,19 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	pm_runtime_set_active(max8997->dev);
 
 	max8997_irq_init(max8997);
-
-	mfd_add_devices(max8997->dev, -1, max8997_devs,
+	ret = mfd_add_devices(max8997->dev, -1, max8997_devs,
 			ARRAY_SIZE(max8997_devs),
 			NULL, 0, NULL);
+	if (ret < 0) {
+		dev_err(dev, "cannot add mfd cells\n");
+		goto err_mfd;
+	}
 
 	/*
 	 * TODO: enable others (flash, muic, rtc, battery, ...) and
 	 * check the return value
 	 */
 
-	if (ret < 0)
-		goto err_mfd;
-
 	/* MAX8997 has a power button input. */
 	device_init_wakeup(max8997->dev, pdata->wakeup);
 
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices
@ 2013-12-16 11:47 Laszlo Papp
  2013-12-16 13:46 ` Lee Jones
  0 siblings, 1 reply; 16+ messages in thread
From: Laszlo Papp @ 2013-12-16 11:47 UTC (permalink / raw)
  To: sameo, lee.jones; +Cc: linux-kernel, Laszlo Papp

Signed-off-by: Laszlo Papp <lpapp@kde.org>
---
 drivers/mfd/max8997.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 791aea3..c7cc235 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -227,19 +227,19 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
 	pm_runtime_set_active(max8997->dev);
 
 	max8997_irq_init(max8997);
-
-	mfd_add_devices(max8997->dev, -1, max8997_devs,
+	ret = mfd_add_devices(max8997->dev, -1, max8997_devs,
 			ARRAY_SIZE(max8997_devs),
 			NULL, 0, NULL);
+	if (ret < 0) {
+		dev_err(dev, "cannot add mfd cells\n");
+		goto err_mfd;
+	}
 
 	/*
 	 * TODO: enable others (flash, muic, rtc, battery, ...) and
 	 * check the return value
 	 */
 
-	if (ret < 0)
-		goto err_mfd;
-
 	/* MAX8997 has a power button input. */
 	device_init_wakeup(max8997->dev, pdata->wakeup);
 
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-16 17:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 12:01 [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices Laszlo Papp
2013-12-16 17:07 ` Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2013-12-16 12:01 Laszlo Papp
2013-12-16 11:47 Laszlo Papp
2013-12-16 13:46 ` Lee Jones
2013-12-16 13:53   ` Laszlo Papp
2013-12-16 15:09     ` Lee Jones
2013-12-16 15:51       ` Laszlo Papp
2013-12-16 16:05         ` Richard Weinberger
2013-12-16 16:13           ` Laszlo Papp
2013-12-16 16:20             ` Richard Weinberger
2013-12-16 16:35         ` Lee Jones
2013-12-16 16:47           ` Laszlo Papp
2013-12-16 17:02             ` Lee Jones
2013-12-16 17:18               ` Laszlo Papp
2013-12-16 17:43                 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.