drm/tegra: sor: No need to free devm_ allocated memory

Memory for the brick clock is allocated by devm_kzalloc(), so there is
no need here to free it explicitly.

The only function that calls tegra_clk_sor_brick_register() is the probe
function and it correctly checks and handles the return value, which, on
failure, will cause devm_ allocated memory to be freed automatically.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Christophe Jaillet 2016-09-24 22:07:30 +02:00 коммит произвёл Thierry Reding
Родитель 87ba3e15fb
Коммит 4141e7448b
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -349,8 +349,6 @@ static struct clk *tegra_clk_sor_brick_register(struct tegra_sor *sor,
brick->hw.init = &init;
clk = devm_clk_register(sor->dev, &brick->hw);
if (IS_ERR(clk))
kfree(brick);
return clk;
}