Thread (1 message) 1 message, 1 author, 2013-12-19
STALE4589d

[PATCH 12/38] arm: s5pv210: add missing put_device call

From: Levente Kurusa <hidden>
Date: 2013-12-19 15:04:33
Also in: linux-samsung-soc, lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

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

Signed-off-by: Levente Kurusa <redacted>
---
 arch/arm/mach-s5pv210/common.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 26027a2..81f43ae 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -267,8 +267,14 @@ core_initcall(s5pv210_core_init);
 
 int __init s5pv210_init(void)
 {
+	int rc = 0;
+
 	printk(KERN_INFO "S5PV210: Initializing architecture\n");
-	return device_register(&s5pv210_dev);
+	rc = device_register(&s5pv210_dev);
+	if (rc)
+		put_device(&s5pv210_dev);
+
+	return rc;
 }
 
 /* uart registration process */
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help