From: Stephen Warren <swarren@wwwdotorg.org>
To: J Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org, broonie@kernel.org,
ldewangan@nvidia.com, sameo@linux.intel.com,
grant.likely@secretlab.ca, swarren@nvidia.com,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
gg@slimlogic.co.uk
Subject: Re: [PATCH v2 2/4] MFD: Palmas: Add SMPS10_BOOST feature
Date: Tue, 18 Jun 2013 09:53:15 -0600 [thread overview]
Message-ID: <51C0826B.4060101@wwwdotorg.org> (raw)
In-Reply-To: <1371549794-7406-1-git-send-email-j-keerthy@ti.com>
On 06/18/2013 04:03 AM, J Keerthy wrote:
> The SMPS10 regulator is not presesnt in all the variants
> of the PALMAS PMIC family. Hence adding a feature to distingush
> between them.
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> + match = of_match_device(of_match_ptr(of_palmas_match_tbl), &i2c->dev);
> +
> + if (match) {
> + features = (unsigned int *)match->data;
> + palmas->features = *features;
> + } else {
> + return -ENODATA;
> + }
I think it's more common to do the error-checking first. That way, the
success-case code doesn't need an indent:
match = of_match...(...);
if (!match)
return -ENODATA;
features = ...;
palmas->features = *features;
next prev parent reply other threads:[~2013-06-18 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 10:03 [PATCH v2 2/4] MFD: Palmas: Add SMPS10_BOOST feature J Keerthy
2013-06-18 15:53 ` Stephen Warren [this message]
2013-06-18 16:56 ` J, KEERTHY
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=51C0826B.4060101@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=broonie@kernel.org \
--cc=gg@slimlogic.co.uk \
--cc=grant.likely@secretlab.ca \
--cc=j-keerthy@ti.com \
--cc=ldewangan@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=swarren@nvidia.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