powerpc/vio: Use put_device() on device_register failure
authorNishanth Aravamudan <nacc@us.ibm.com>
Wed, 15 Sep 2010 08:05:47 +0000 (08:05 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 13 Oct 2010 05:19:21 +0000 (16:19 +1100)
commitedea8f6f48416d9a6fd1babb76c19cf05c802325
tree07e531b594c3493206d119fd068aa2e5f902e97c
parentffa56e555a6e4c205e879636e6cd6104ce03421f
powerpc/vio: Use put_device() on device_register failure

The kernel doc for device_register (and device_initialize) very clearly
state to call put_device not kfree after calling, even on error.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/vio.c