Re: [PATCH] Input: Introduce the use of the managed version of kzalloc
From: Dmitry Torokhov
Date: Thu May 08 2014 - 12:04:27 EST
Hi Himangi,
On Wed, May 07, 2014 at 10:16:38AM +0530, Himangi Saraogi wrote:
> This patch moves data allocated using kzalloc to managed data allocated
> using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
> functions.
I prefer not to mix managed and unmanaged resources in one driver. I.e.
either all (or most) resources are managed or they are all unmanaged,
otherwise it is really hard to track which one should be freed and
which will be freed automatically.
In this very simple driver I do not see converting only memory
allocation to devm as bringing clear benefit,
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/