]> git.karo-electronics.de Git - karo-tx-linux.git/commit
acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed
authorWen Congyang <wency@cn.fujitsu.com>
Thu, 25 Oct 2012 01:14:38 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 1 Nov 2012 04:23:58 +0000 (15:23 +1100)
commite58e78470a850467c881da3aac60cf39ec8ecbea
tree32cade48f3df6e27fb1bdeb06b2a1abd4701f554
parent08b55c45f60ba57fe6a04ce8f9d9d603d02157cc
acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed

If acpi_memory_enable_device() fails, acpi_memory_enable_device() will
return a non-zero value, which means we fail to bind the memory device to
this driver.  So we should free memory device before
acpi_memory_device_add() returns.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/acpi/acpi_memhotplug.c