From: Andy Shevchenko Date: Tue, 29 Jan 2019 18:37:28 +0000 (+0200) Subject: gpio: wcove: Allow return negative error code from to_reg() X-Git-Tag: v5.1-rc1~102^2~27^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=282db906eecccb08b8f0adccd082a129ae1d95d8;p=thirdparty%2Fkernel%2Flinux.git gpio: wcove: Allow return negative error code from to_reg() The type of to_reg() is unsigned int while it might return a negative error code. Callers are also expecting a signed type. For sake of type consistency replace unsigned int with plain int. Signed-off-by: Andy Shevchenko --- diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c index dde7c6aecbb5e..4afc8580ecd7a 100644 --- a/drivers/gpio/gpio-wcove.c +++ b/drivers/gpio/gpio-wcove.c @@ -105,7 +105,7 @@ struct wcove_gpio { bool set_irq_mask; }; -static inline unsigned int to_reg(int gpio, enum ctrl_register reg_type) +static inline int to_reg(int gpio, enum ctrl_register reg_type) { unsigned int reg;