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:09:17 +0000 (13:09 +0200)
commit54046f1793c7a35e7b8c63964c181faf384bcc38
tree2ae63fe4db54d3b55a684bb692be89aa162722d4
parent87011fb97fe5a4b05c7c7c532502b45947fc4709
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