]> 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>
Tue, 14 Aug 2012 03:22:24 +0000 (13:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 22 Aug 2012 05:53:25 +0000 (15:53 +1000)
commit526531c77b5932be2d8f3852000f2fbd7593bd55
tree550b23325c276d846f8e6651c6c51e082b587249
parentfdf23e810af083ef0d09d71d0e71aedd05280b33
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