]> 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>
Fri, 7 Sep 2012 00:17:48 +0000 (10:17 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:02 +0000 (15:36 +1000)
commit200c7a956fb44ba912b0aaf4466137eceeb86209
tree9d91a76ba22800f2c2bb167d22dd11fff91895a2
parent762be495313190b4b44744bba61cbe2c3903c049
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