gpio: pca954x: fix undefined error code from remove
The recent addition of the regulator support has led to the pca953x_remove function returning uninitialized data when no platform data pointer is provided, as gcc warns when using -Wmaybe-uninitialized: drivers/gpio/gpio-pca953x.c: In function 'pca953x_remove': drivers/gpio/gpio-pca953x.c:860:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This restores the previous behavior, returning 0 on success. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: e23efa31 ("gpio: pca954x: Add vcc regulator and enable it") Acked-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Showing
想要评论请 注册 或 登录