• Linus Walleij's avatar
    mfd: tps65010: Be sure to clamp return value · bf3de47f
    Linus Walleij authored
    As we want gpio_chip .get() calls to be able to return negative
    error codes and propagate to drivers, we need to go over all
    drivers and make sure their return values are clamped to [0,1].
    We do this by using the ret = !!(val) design pattern.
    
    This also start to propagate the negative error code from the
    smbus call if there is one, as the last commit of this series
    will make the gpiolib core deal with that properly.
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    bf3de47f
tps65010.c 28.3 KB