All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Cc: linux-pm@lists.linux-foundation.org,
	Philipp Zabel <philipp.zabel@gmail.com>
Subject: [PATCH 1/3] bq24022: Evaluate returns of gpio_direction_output-calls
Date: Sun, 28 Aug 2011 15:08:30 +0200	[thread overview]
Message-ID: <201108281508.31412.heiko@sntech.de> (raw)
In-Reply-To: <201108281507.35105.heiko@sntech.de>

It wasn't done before.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/regulator/bq24022.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c
index e24d1b7..973af08 100644
--- a/drivers/regulator/bq24022.c
+++ b/drivers/regulator/bq24022.c
@@ -104,7 +104,17 @@ static int __init bq24022_probe(struct platform_device *pdev)
 		goto err_iset2;
 	}
 	ret = gpio_direction_output(pdata->gpio_iset2, 0);
+	if (ret) {
+		dev_dbg(&pdev->dev, "couldn't set ISET2 GPIO: %d\n",
+			pdata->gpio_iset2);
+		goto err_reg;
+	}
 	ret = gpio_direction_output(pdata->gpio_nce, 1);
+	if (ret) {
+		dev_dbg(&pdev->dev, "couldn't set nCE GPIO: %d\n",
+			pdata->gpio_nce);
+		goto err_reg;
+	}
 
 	bq24022 = regulator_register(&bq24022_desc, &pdev->dev,
 				     pdata->init_data, pdata);
-- 
1.7.2.3

  reply	other threads:[~2011-08-28 13:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-28 13:07 [PATCH 0/3] bq24022: Add support for bq2407x family Heiko Stübner
2011-08-28 13:08 ` Heiko Stübner [this message]
2011-08-29  9:16   ` [PATCH 1/3] bq24022: Evaluate returns of gpio_direction_output-calls Mark Brown
2011-08-28 13:09 ` [PATCH 2/3] bq24022: Keep track of gpio states Heiko Stübner
2011-08-29  9:18   ` Mark Brown
2011-08-28 13:10 ` [PATCH 3/3] bq24022: Add support for the bq2407x family Heiko Stübner

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=201108281508.31412.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lrg@ti.com \
    --cc=philipp.zabel@gmail.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 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.