[PATCH 20/38] net: iucv: add missing put_device call

Levente Kurusa
2013-12-19T15:12:55Z

net/iucv/af_iucv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 168aff5..0096206 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -2377,8 +2377,10 @@ static int afiucv_iucv_init(void)
af_iucv_dev->release = (void (*)(struct device *))kfree;
af_iucv_dev->driver = &af_iucv_driver;
err = device_register(af_iucv_dev);
- if (err)
+ if (err) {
+ put_device(af_iucv_dev);
goto out_driver;
+ }
return 0;

out_driver:
--
1.8.3.1