pinctrl: nsp: off by ones in nsp_pinmux_enable()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Jul 2018 12:04:25 +0000 (15:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:12:39 +0000 (13:12 +0200)
commit6219a83d92f3316c690408858e9453c691bd7d11
treeaab3994913676e0a26623337edd8aad4024bd1e5
parentd4efb85f5f5a5eeba2a461b579bbe8b4af843f95
pinctrl: nsp: off by ones in nsp_pinmux_enable()

[ Upstream commit f90a21c898db58eaea14b8ad7e9af3b9e15e5f8a ]

The > comparisons should be >= or else we read beyond the end of the
pinctrl->functions[] array.

Fixes: cc4fa83f66e9 ("pinctrl: nsp: add pinmux driver support for Broadcom NSP SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/bcm/pinctrl-nsp-mux.c