From 7a7e060b1544298920d6c8c3128ad890e64875d8 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 8 Dec 2009 07:04:03 -0200 Subject: [PATCH] Fix releasing cdev when if registering fails. --- helloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helloc.c b/helloc.c index 1a2c238..0a7cf40 100644 --- a/helloc.c +++ b/helloc.c @@ -51,7 +51,7 @@ static int __init helloc_init(void) goto out_add; return 0; out_add: - kfree(&cdev->kobj); + kfree(cdev); out_alloc: unregister_chrdev_region(dev, 1); out_region: -- 2.20.1