[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d348b031-5e06-2d0f-01ae-0ee310f03873@gmail.com>
Date: Mon, 24 Apr 2017 17:03:39 +0200
From: Marek Vasut <marek.vasut@...il.com>
To: Lee Jones <lee.jones@...aro.org>
Cc: linux-renesas-soc@...r.kernel.org,
Marek Vasut <marek.vasut+renesas@...il.com>,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH 2/4] mfd: Add ROHM BD9571MWV-M MFD PMIC driver
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
Powered by blists - more mailing lists