From: Rusty Russell Date: Sun, 9 Nov 2014 23:02:29 +0000 (+1030) Subject: params: cleanup sysfs allocation X-Git-Tag: omap-for-v3.20/drop-legacy-3517~28^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18eb74fa94161380c1acc9cf562cb835c4e54a25;p=pandora-kernel.git params: cleanup sysfs allocation commit 63662139e519ce06090b2759cf4a1d291b9cc0e2 attempted to patch a leak (which would only happen on OOM, ie. never), but it didn't quite work. This rewrites the code to be as simple as possible. add_sysfs_param() adds a parameter. If it fails, it's the caller's responsibility to clean up the parameters which already exist. The kzalloc-then-always-krealloc pattern is perhaps overly simplistic, but this code has clearly confused people. It worked on me... Signed-off-by: Rusty Russell --- Reading git-diff-tree failed