projects
/
cascardo
/
kernel
/
samples
/
02.char
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix releasing cdev when if registering fails.
[cascardo/kernel/samples/02.char/.git]
/
helloc.c
diff --git
a/helloc.c
b/helloc.c
index
1a2c238
..
0a7cf40
100644
(file)
--- 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: