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>
This commit is contained in:
Dan Carpenter 2019-03-28 17:40:22 +03:00 committed by Linus Walleij
parent 5e73de3413
commit c7df94c64c

View 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;
}