Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490737 > unrolled thread

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

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2016-09-24 22:10 +0200
Last post2016-09-24 22:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/tegra: sor: No need to free devm_ allocated memory Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-09-24 22:10 +0200

#1490737 — [PATCH] drm/tegra: sor: No need to free devm_ allocated memory

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-09-24 22:10 +0200
Subject[PATCH] drm/tegra: sor: No need to free devm_ allocated memory
Message-ID<sl1qN-5tF-9@gated-at.bofh.it>
'brick' has been allocated by 'devm_kzalloc', so there is no need here to
free it explicitly.
There is only one caller of 'tegra_clk_sor_brick_register()'. This function
is a probe function which correctly checks and handles the return value of
'tegra_clk_sor_brick_register()'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/tegra/sor.c | 2 --
 1 file changed, 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;
 }
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web