aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/sor.c
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2016-09-24 22:07:30 +0200
committerThierry Reding <treding@nvidia.com>2016-11-07 13:03:41 +0100
commit4141e7448b501227967ff274af5f4eadadb6068b (patch)
treecdee9ef5c5d16e5c5c048c49f141c484076a7abe /drivers/gpu/drm/tegra/sor.c
parentdrm/tegra: Fix error handling (diff)
downloadlinux-dev-4141e7448b501227967ff274af5f4eadadb6068b.tar.xz
linux-dev-4141e7448b501227967ff274af5f4eadadb6068b.zip
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>
Diffstat (limited to 'drivers/gpu/drm/tegra/sor.c')
-rw-r--r--drivers/gpu/drm/tegra/sor.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 74d0540b8d4c..a8f528925009 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -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;
}