Stephen Boyd bcd53f858d pinctrl: qcom: Don't iterate past end of function array
Timur reports that this code crashes if nfunctions is 0. Fix the
loop iteration to only consider valid elements of the functions
array.

Reported-by: Timur Tabi <timur@codeaurora.org>
Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: Ivan T. Ivanov <iivanov@mm-sol.com>
Cc: Andy Gross <agross@codeaurora.org>
Fixes: 327455817a92 "pinctrl: qcom: Add support for reset for apq8064"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-19 11:17:45 +01:00
..
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2015-01-14 14:20:33 +01:00
2014-10-29 09:28:35 +01:00
2014-12-14 14:57:16 -08:00