Re: [PATCH] gpio: twl4030: Remove redundant assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/27/2014 11:24 AM, Linus Walleij wrote:
> On Mon, Feb 24, 2014 at 4:34 PM, Roger Quadros <rogerq@xxxxxx> wrote:
>> On 02/24/2014 04:25 PM, Linus Walleij wrote:
>>> On Sat, Feb 15, 2014 at 2:34 PM, Alexander Shiyan <shc_work@xxxxxxx> wrote:
>>>
>>>> -       status = twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
>>>> -                                 TWL4030_LED_LEDEN_REG);
>>>> +
>>>> +       twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
>>>> +                        TWL4030_LED_LEDEN_REG);
>>>
>>> Isn't the right fix to actually *check* this status instead?
>>>
>>> TI dudes?
>>
>> Yes we should check for error. But the only action we can take is maybe print an error message
>> as all the users of this function return void. e.g. twl_set().
>>
>> It seems the set() hook of struct gpio_chip also doesn't expect any return value. Wondering if that should change.
> 
> I think in this case simply printing an error and bailing out is
> just fine, people will be able to debug from there.

FWIW: if a write to twl4030 fails we are anyways in a big trouble. This is the
PMIC in the system, so it is likely that we do not even boot in such case.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux