]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
greybus: svc: free pwrmon_rails memory upon exit
authorDavid Lin <dtwlin@google.com>
Sat, 23 Apr 2016 02:03:43 +0000 (19:03 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 25 Apr 2016 18:13:59 +0000 (11:13 -0700)
commit9983ea6b766aa701707e50c4b767ca892ee9ba7d
tree56429e900177ff2f7ff04682dc49b6769fd92417
parent3fd747a63e836baab1739bab7f18d9227a083312
greybus: svc: free pwrmon_rails memory upon exit

For every time SVC instance is created, memories for storing the rail IDs
are allocated, however, they are not freed when the SVC is destroyed.
This patch fixes the memory leak by freeing the memory when debugfs for
SVC is no longer needed.

Testing Done:
- Check pwrmon debugfs after turning on and off SVC

Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c