]> 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>
Wed, 26 Sep 2012 01:32:58 +0000 (11:32 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 06:37:54 +0000 (16:37 +1000)
commit8c405c93532cd062c3e2f3585a7595deb5d18257
treecb2256667375893fe11f6d1cef80625ff8b4bbef
parentcffa5b8dcb997427c6ccaa1a2b939b65f3109ce1
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