Commit 6d991f5
char: misc: deallocate static minor in error path
When creating sysfs files fail, the allocated minor must be freed such that
it can be later reused. That is specially harmful for static minor numbers,
since those would always fail to register later on.
Fixes: 6d04d2b ("misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors")
Cc: stable <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 038ef07 commit 6d991f5
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
267 | 268 | | |
268 | | - | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
0 commit comments