This is required so that we give up the last reference to the device. Signed-off-by: Levente Kurusa <levex@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html