Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zheng Bin and committed by
Greg Kroah-Hartman
10610130 8cc6b422

+1
+1
drivers/accessibility/speakup/speakup_soft.c
··· 397 397 synthu_device.name = "softsynthu"; 398 398 synthu_device.fops = &softsynthu_fops; 399 399 if (misc_register(&synthu_device)) { 400 + misc_deregister(&synth_device); 400 401 pr_warn("Couldn't initialize miscdevice /dev/softsynthu.\n"); 401 402 return -ENODEV; 402 403 }