From: Marek Vasut <marek.vasut@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-renesas-soc@vger.kernel.org,
Marek Vasut <marek.vasut+renesas@gmail.com>,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH 2/4] mfd: Add ROHM BD9571MWV-M MFD PMIC driver
Date: Mon, 24 Apr 2017 17:03:39 +0200 [thread overview]
Message-ID: <d348b031-5e06-2d0f-01ae-0ee310f03873@gmail.com> (raw)
In-Reply-To: <20170424113847.4z7bobboucttk3ir@dell>
On 04/24/2017 01:38 PM, Lee Jones wrote:
> On Sun, 16 Apr 2017, Marek Vasut wrote:
[...]
>> +static int bd9571mwv_identify(struct bd9571mwv *bd)
>> +{
>> + struct device *dev = bd->dev;
>> + unsigned int value;
>> + int ret;
>> +
>> + ret = regmap_read(bd->regmap, BD9571MWV_VENDOR_CODE, &value);
>> + if (ret) {
>> + dev_err(dev, "Failed to read vendor code register\n");
>
> Nit: Don't you care what the return value is?
Not really, but I added the reporting. I wonder whether it shouldn't be
the regmap which reports those kinds of failures, just like ie. when
k*alloc() fails.
>> + return ret;
>> + }
>> +
>> + if (value != BD9571MWV_VENDOR_CODE_VAL) {
>> + dev_err(dev, "Invalid vendor code ID %02x (expected %02x)\n",
>> + value, BD9571MWV_VENDOR_CODE_VAL);
>> + return -EINVAL;
>> + }
>> +
>> + ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_CODE, &value);
>> + if (ret) {
>> + dev_err(dev, "Failed to read product code register\n");
>
> Same.
And fixed globally ...
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2017-04-24 15:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170416180801.17828-1-marek.vasut+renesas@gmail.com>
2017-04-16 18:07 ` Marek Vasut
2017-04-24 11:38 ` Lee Jones
2017-04-24 15:03 ` Marek Vasut [this message]
2017-04-16 18:08 ` [PATCH 4/4] regulator: Add ROHM BD9571MWV-M PMIC regulator driver Marek Vasut
2017-04-18 17:57 ` Mark Brown
2017-04-18 18:39 ` Marek Vasut
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=d348b031-5e06-2d0f-01ae-0ee310f03873@gmail.com \
--to=marek.vasut@gmail.com \
--cc=geert+renesas@glider.be \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@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
Powered by JetHome