]> git.baikalelectronics.ru Git - kernel.git/commit
bcma: don't leak memory for PCIE, MIPS, GBIT cores
authorSaul St. John <saul.stjohn@gmail.com>
Thu, 16 Aug 2012 20:42:30 +0000 (15:42 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Sep 2012 19:03:35 +0000 (15:03 -0400)
commit78464b993b2ef9419c6db5046d4873f61e6c969e
treea87d54d00a97a61258a9882a598cba39224d0812
parent7ceb4714da7f0e39ddec6400f2a78ac85c363ac7
bcma: don't leak memory for PCIE, MIPS, GBIT cores

bcma_scan_bus allocates a bcma_core for each core found on the bus, but the
memory for cores handled by the bcma driver itself was not being freed when
the bus was unregistered. This patch adds special handling for the PCIE,
MIPS, and GBIT COMMON cores, to ensure that their memory allocation is
freed as well.

Note that this patch doesn't address the memory allocated for the CC core,
as that was corrected in my previous patch "bcma: register cc core driver,
device."

Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Saul St. John <saul.stjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bcma/main.c