Re: [patch] regulator: 88pm800: forever loop in pm800_regulator_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/8/15 Dan Carpenter <dan.carpenter@xxxxxxxxxx>:
> This is supposed to be testing "i < ARRAY_SIZE()" instead of just
> "ARRAY_SIZE()".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
> index 58e9b74..3459f60 100644
> --- a/drivers/regulator/88pm800.c
> +++ b/drivers/regulator/88pm800.c
> @@ -302,7 +302,7 @@ static int pm800_regulator_probe(struct platform_device *pdev)
>                 unsigned int count = 0;
>
>                 /* Check whether num_regulator is valid. */
> -               for (i = 0; ARRAY_SIZE(pdata->regulators); i++) {
> +               for (i = 0; i < ARRAY_SIZE(pdata->regulators); i++) {
>                         if (pdata->regulators[i])
>                                 count++;
>                 }
Oops. My bad. Thanks for the fix.
Reviewed-by: Axel Lin <axel.lin@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux