lkml.org 
[lkml]   [2013]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/38] arm: s390: add missing put_device call
Date
This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
---
arch/s390/kernel/time.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 064c308..16c717f 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -1351,8 +1351,10 @@ static int __init etr_register_port(struct device *dev)
int rc;

rc = device_register(dev);
- if (rc)
+ if (rc) {
+ put_device(dev);
goto out;
+ }
for (attr = etr_port_attributes; *attr; attr++) {
rc = device_create_file(dev, *attr);
if (rc)
--
1.8.3.1


\
 
 \ /
  Last update: 2013-12-19 17:01    [W:0.249 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site