diff options
author | Zheng Bin <zhengbin13@huawei.com> | 2022-05-11 11:29:37 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-19 18:56:48 +0200 |
commit | 106101303eda8f93c65158e5d72b2cc6088ed034 (patch) | |
tree | 6bc52c3ffb461d05b491ae46fc29cdf4a3518167 | |
parent | 8cc6b422fc4b32a91810e16548353fc3eba39b13 (diff) | |
download | linux-106101303eda8f93c65158e5d72b2cc6088ed034.tar.gz |
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>
-rw-r--r-- | drivers/accessibility/speakup/speakup_soft.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c index 1ced2721513e..99f1d4ac426a 100644 --- a/drivers/accessibility/speakup/speakup_soft.c +++ b/drivers/accessibility/speakup/speakup_soft.c @@ -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; } |