summaryrefslogtreecommitdiffstats
path: root/drivers/sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-12-15 23:50:51 +0100
committerSimon Horman <horms+renesas@verge.net.au>2013-01-25 09:24:21 +0900
commita99ebec16c0586ec0838558fd1a050801037ebc9 (patch)
tree6b828ffec233eb8d6e9cc72fd091651520bdf6c9 /drivers/sh
parent4a2e0d18f95e1ec2b264f66e7cedec7f3dc54b44 (diff)
downloadlinux-stable-a99ebec16c0586ec0838558fd1a050801037ebc9.tar.gz
linux-stable-a99ebec16c0586ec0838558fd1a050801037ebc9.tar.bz2
linux-stable-a99ebec16c0586ec0838558fd1a050801037ebc9.zip
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>
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/pfc/gpio.c4
1 files changed, 2 insertions, 2 deletions
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);