Re: [PATCH] omap: pm: Fix overflow when doing powerdomain deps lookups.

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

 



Mike Chan <mike@xxxxxxxxxxx> writes:

> Signed-off-by: Mike Chan <mike@xxxxxxxxxxx>
> ---
>  arch/arm/mach-omap2/powerdomain.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
> index 0334609..6077629 100644
> --- a/arch/arm/mach-omap2/powerdomain.c
> +++ b/arch/arm/mach-omap2/powerdomain.c
> @@ -90,7 +90,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
>  	if (!pwrdm || !deps || !omap_chip_is(pwrdm->omap_chip))
>  		return ERR_PTR(-EINVAL);
>  
> -	for (pd = deps; pd; pd++) {
> +	for (pd = deps; pd->pwrdm_name; pd++) {

Maybe should be:

	for (pd = deps; pd && pd->pwrdm_name; pd++) {

?

>  
>  		if (!omap_chip_is(pd->omap_chip))
>  			continue;

Also, a descriptive changelog would be helpful here describing the
conditions where you saw overflow etc.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux