* [PATCH] drm/tegra: sor: No need to free devm_ allocated memory
@ 2016-09-24 20:07 Christophe JAILLET
2016-11-07 12:05 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-09-24 20:07 UTC (permalink / raw)
To: thierry.reding, airlied, swarren, gnurou, linux-tegra
Cc: dri-devel, linux-kernel, kernel-janitors, Christophe JAILLET
'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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/tegra: sor: No need to free devm_ allocated memory
2016-09-24 20:07 [PATCH] drm/tegra: sor: No need to free devm_ allocated memory Christophe JAILLET
@ 2016-11-07 12:05 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2016-11-07 12:05 UTC (permalink / raw)
To: Christophe JAILLET
Cc: gnurou, swarren, kernel-janitors, linux-kernel, dri-devel,
linux-tegra
[-- Attachment #1: Type: text/plain, Size: 590 bytes --]
On Sat, Sep 24, 2016 at 10:07:30PM +0200, Christophe JAILLET wrote:
> '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(-)
Applied, with a slightly reworded commit message.
Thanks,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-07 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 20:07 [PATCH] drm/tegra: sor: No need to free devm_ allocated memory Christophe JAILLET
2016-11-07 12:05 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).