linux-pm.vger.kernel.org archive mirror
 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 v2 1/4] bq24022: Evaluate returns of gpio_direction_output-calls
Date: Mon, 29 Aug 2011 17:56:17 +0200	[thread overview]
Message-ID: <201108291756.17516.heiko@sntech.de> (raw)
In-Reply-To: <201108291755.15701.heiko@sntech.de>

It wasn't done before.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 Changes since v1: use dev_err instead of dev_dbg
 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..56627d7 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_err(&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_err(&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-29 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 15:55 [PATCH v2 0/4] bq24022: Add support for bq2407x family Heiko Stübner
2011-08-29 15:56 ` Heiko Stübner [this message]
2011-08-30 10:39   ` [PATCH v2 1/4] bq24022: Evaluate returns of gpio_direction_output-calls Mark Brown
2011-08-29 15:57 ` [PATCH 2/4] bq24022: Use dev_err instead of dev_dbg for error messages Heiko Stübner
2011-08-30 10:40   ` Mark Brown
2011-08-29 15:58 ` [PATCH 3/4] bq24022: Keep track of gpio states Heiko Stübner
2011-08-29 15:59 ` [PATCH v2 4/4] bq24022: Add support for the bq2407x family Heiko Stübner
2011-08-30 10:52   ` Mark Brown

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=201108291756.17516.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).