Re: [PATCH] PM / devfreq: tegra: Register governor on module init

From: Thierry Reding
Date: Mon Mar 30 2015 - 11:08:44 EST


On Mon, Mar 30, 2015 at 02:54:38PM +0200, Tomeu Vizoso wrote:
[...]
> +static int __init tegra_devfreq_init(void)
> +{
> + int ret = 0;
> +
> + ret = devfreq_add_governor(&tegra_devfreq_governor);
> + if (ret) {
> + pr_err("%s: failed to add governor: %d\n", __func__, ret);
> + return ret;
> + }
> +
> + return platform_driver_register(&tegra_devfreq_driver);

Shouldn't you remove the governor on driver registration failure?

Thierry

Attachment: pgpTGw6xAAbHf.pgp
Description: PGP signature