From: Laszlo Papp <lpapp@kde.org>
To: sameo@linux.intel.com, lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, Laszlo Papp <lpapp@kde.org>
Subject: [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices
Date: Mon, 16 Dec 2013 11:47:04 +0000 [thread overview]
Message-ID: <1387194424-2701-1-git-send-email-lpapp@kde.org> (raw)
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
next reply other threads:[~2013-12-16 11:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 11:47 Laszlo Papp [this message]
2013-12-16 13:46 ` [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices 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
-- strict thread matches above, loose matches on Subject: below --
2013-12-16 12:01 Laszlo Papp
2013-12-16 12:01 Laszlo Papp
2013-12-16 17:07 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387194424-2701-1-git-send-email-lpapp@kde.org \
--to=lpapp@kde.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox