mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Paul Mundt <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Simon Horman <[email protected]>
This commit is contained in:
parent
4a2e0d18f9
commit
a99ebec16c
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue