提交 10610130 编写于 作者: Z Zheng Bin 提交者: Greg Kroah-Hartman

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: NZheng Bin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/20220511032937.2736738-1-zhengbin13@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8cc6b422
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册