pinctrl: imx: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 28 Mar 2019 14:40:22 +0000 (17:40 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 8 Apr 2019 11:06:30 +0000 (13:06 +0200)
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>
drivers/pinctrl/freescale/pinctrl-imx.c

index 188001beb298f1f8e0cb193aea789276e57b518d..d2d4b8ffc08d311f6bfe6d6eb9d1c446137961a5 100644 (file)
@@ -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;
                }