Subject: [PATCH 04/38] powerpc: kernel: add missing put_device call

From: Levente Kurusa <[email-masked]>
Date: Thu, 19 Dec 2013 16:03:15 +0100

This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <[email-masked]>
---
 arch/powerpc/kernel/vio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index e7d0c88f..e8ed87e 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1494,6 +1494,7 @@ static int __init vio_bus_init(void)
 	if (err) {
 		printk(KERN_WARNING "%s: device_register returned %i\n",
 				__func__, err);
+		put_device(&vio_bus_device.dev);
 		return err;
 	}
 
-- 
1.8.3.1