From: Laurent Pinchart Date: Sat, 15 Dec 2012 22:50:51 +0000 (+0100) Subject: sh-pfc: Remove check for impossible error condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a99ebec16c0586ec0838558fd1a050801037ebc9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sh-pfc: Remove check for impossible error condition The pfc pointer can't be NULL in the get and set value functions, remove the error check. Signed-off-by: Laurent Pinchart Acked-by: Paul Mundt Acked-by: Linus Walleij Signed-off-by: Simon Horman --- diff --git a/drivers/sh/pfc/gpio.c b/drivers/sh/pfc/gpio.c index 37493e5fe2ee..c11c1bb97c71 100644 --- a/drivers/sh/pfc/gpio.c +++ b/drivers/sh/pfc/gpio.c @@ -52,7 +52,7 @@ static void sh_gpio_set_value(struct sh_pfc *pfc, unsigned gpio, int value) struct pinmux_data_reg *dr = NULL; int bit = 0; - if (!pfc || sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0) + if (sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0) BUG(); else sh_pfc_write_bit(dr, bit, value); @@ -63,7 +63,7 @@ static int sh_gpio_get_value(struct sh_pfc *pfc, unsigned gpio) struct pinmux_data_reg *dr = NULL; int bit = 0; - if (!pfc || sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0) + if (sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0) return -EINVAL; return sh_pfc_read_bit(dr, bit);