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

Reply via email to