• Geert Uytterhoeven's avatar
    regulator: da9063: Fix PTR_ERR/ERR_PTR mismatch · e8cb204c
    Geert Uytterhoeven authored
    If CONFIG_OF=n:
    
    drivers/regulator/da9063-regulator.c: In function ‘da9063_parse_regulators_dt’:
    drivers/regulator/da9063-regulator.c:712: warning: passing argument 1 of ‘PTR_ERR’ makes pointer from integer without a cast
    drivers/regulator/da9063-regulator.c:712: warning: return makes pointer from integer without a cast
    
    Use ERR_PTR() to encode an error code in a pointer.
    PTR_ERR() is meant to decode an error code from a pointer.
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    e8cb204c
da9063-regulator.c 25.8 KB