pinctrl: imx: Return NULL if no group is matched and found
authorHui Wang <hui.wang@canonical.com>
Thu, 27 Mar 2025 03:16:00 +0000 (11:16 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Apr 2025 07:42:15 +0000 (09:42 +0200)
commite64c0ff0d5d85791fbcd126ee558100a06a24a97
tree9eae7f40f74e567a3116860dfb88db162fe362ef
parent0af2f6be1b4281385b618cb86ad946eded089ac8
pinctrl: imx: Return NULL if no group is matched and found

Currently if no group is matched and found, this function will return
the last grp to the caller, this is not expected, it is supposed to
return NULL in this case.

Fixes: e566fc11ea76 ("pinctrl: imx: use generic pinctrl helpers for managing groups")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/20250327031600.99723-1-hui.wang@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx.c