mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
accessiblity: speakup: Add missing misc_deregister in softsynth_probe
softsynth_probe misses a call misc_deregister() in an error path, this patch fixes that. Signed-off-by: Zheng Bin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/20220511032937.2736738-1-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8cc6b422fc
commit
106101303e
@ -397,6 +397,7 @@ static int softsynth_probe(struct spk_synth *synth)
|
||||
synthu_device.name = "softsynthu";
|
||||
synthu_device.fops = &softsynthu_fops;
|
||||
if (misc_register(&synthu_device)) {
|
||||
misc_deregister(&synth_device);
|
||||
pr_warn("Couldn't initialize miscdevice /dev/softsynthu.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user