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 28/38] superhyway: intc: 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>
---
drivers/sh/intc/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 8f32a13..c89768e 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -504,8 +504,10 @@ static int __init register_intc_devs(void)
if (error == 0)
error = device_create_file(&d->dev,
&dev_attr_name);
- if (error)
+ if (error) {
+ put_device(&d->dev);
break;
+ }
}
}

--
1.8.3.1


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