summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-03-28 15:40:22 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-08 13:06:30 +0200
commitc7df94c64ca20d13ba0b9442e355f80a1f5c3e43 (patch)
tree19f1ac705d1499a2f03a735566983948beb99580 /drivers/pinctrl
parentpinctrl: add drive for I2C related pins on MT8183 (diff)
downloadlinux-c7df94c64ca20d13ba0b9442e355f80a1f5c3e43.tar.xz
linux-c7df94c64ca20d13ba0b9442e355f80a1f5c3e43.zip
pinctrl: imx: remove an unnecessary NULL check
The address of "ipctl->pin_regs[pin_id]" can't be NULL. It's the offset into an array in the middle of a struct. This patch removes the check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/freescale/pinctrl-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 188001beb298..d2d4b8ffc08d 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -449,7 +449,7 @@ static void imx_pinconf_dbg_show(struct pinctrl_dev *pctldev,
}
} else {
pin_reg = &ipctl->pin_regs[pin_id];
- if (!pin_reg || pin_reg->conf_reg == -1) {
+ if (pin_reg->conf_reg == -1) {
seq_puts(s, "N/A");
return;
}