Skip to content

Commit a99ebec

Browse files
Laurent Pincharthorms
authored andcommitted
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 <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 parent 4a2e0d1 commit a99ebec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/sh/pfc/gpio.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static void sh_gpio_set_value(struct sh_pfc *pfc, unsigned gpio, int value)
5252
struct pinmux_data_reg *dr = NULL;
5353
int bit = 0;
5454

55-
if (!pfc || sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0)
55+
if (sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0)
5656
BUG();
5757
else
5858
sh_pfc_write_bit(dr, bit, value);
@@ -63,7 +63,7 @@ static int sh_gpio_get_value(struct sh_pfc *pfc, unsigned gpio)
6363
struct pinmux_data_reg *dr = NULL;
6464
int bit = 0;
6565

66-
if (!pfc || sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0)
66+
if (sh_pfc_get_data_reg(pfc, gpio, &dr, &bit) != 0)
6767
return -EINVAL;
6868

6969
return sh_pfc_read_bit(dr, bit);

0 commit comments

Comments
 (0)