[PATCH 28/38] superhyway: intc: add missing put_device call

Levente Kurusa
2013-12-19T15:06:54Z

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