Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670539
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V1 3/3] pinctrl: qcom: spmi-gpio: Correct power_source range check |
| Date | 2017-06-20 11:40 +0200 |
| Message-ID | <tUnND-6PZ-7@gated-at.bofh.it> (permalink) |
| References | <tRNlf-4p4-1@gated-at.bofh.it> <tRNuW-4sb-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jun 13, 2017 at 8:16 AM, <fenglinw@codeaurora.org> wrote: > From: Fenglin Wu <fenglinw@codeaurora.org> > > Power source selection in DIG_VIN_CTL is indexed from 0, in the range > check it shouldn't be equal to the total number of power sources. > > Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org> > --- > drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > index 581309d..1fd677c 100644 > --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > @@ -500,7 +500,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin, > pad->is_enabled = false; > break; > case PIN_CONFIG_POWER_SOURCE: > - if (arg > pad->num_sources) > + if (arg >= pad->num_sources) > return -EINVAL; > pad->power_source = arg; > break; Björn can you ACK this? Yours, Linus Walleij
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH V1 3/3] pinctrl: qcom: spmi-gpio: Correct power_source range check Linus Walleij <linus.walleij@linaro.org> - 2017-06-20 11:40 +0200
csiph-web