[PATCH] ARM amba: optional PrimeCell core voltage switch

Sundar sunder.svit at gmail.com
Wed Nov 3 10:11:44 EDT 2010


On Wed, Nov 3, 2010 at 3:39 PM, Linus Walleij
<linus.walleij at stericsson.com> wrote:
>
> +static int amba_get_enable_vcore(struct amba_device *pcdev)
> +{
> +       struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
> +       int ret;
> +
> +       pcdev->vcore = vcore;
> +
> +       if (IS_ERR(vcore)) {
> +               /* It is OK not to supply a vcore regulator */
> +               if (PTR_ERR(vcore) == -ENODEV)
> +                       return 0;
> +               return PTR_ERR(vcore);
> +       }

If i am right, you corrupt the pcdev->vcore even in an error case.

Cheers!



More information about the linux-arm-kernel mailing list