From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 132EFC433EF for ; Tue, 7 Jun 2022 18:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240387AbiFGSYg (ORCPT ); Tue, 7 Jun 2022 14:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352168AbiFGSQ5 (ORCPT ); Tue, 7 Jun 2022 14:16:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA07A11141; Tue, 7 Jun 2022 10:50:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8465161650; Tue, 7 Jun 2022 17:50:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A3CDC34115; Tue, 7 Jun 2022 17:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654624253; bh=b0y7kcZVJHUzbw5GlGaRG2weKRKicsuh66ywd8v6S5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q7hStlKvc5btCB3Cj473dwObUBZ2TZOPM9ak5lbryL+4EPwjK35YYnoU+oPoO5ln6 353X49dV26sf7xI6SRGLv8pcNtopGJPuXakj85O9zUPUAMyj/V/h1Y0fFtKj3lwCYG J8UQM9wtcuE1jAWZi5RbiPqhADTayCMSBZy4GdHw+BwclUju3PlRKrit+k5Z5J16dR j6vvBOkEZgwANi+NbgtK4XdoJCRtWe9/EWZ0pxlIOheIVh/iqfo7P9d+GCG5ps9OLf nihEoj0VMN+g8dqH5XGQ3rCRxrNmUPANlKbQ5XJEe0zIBV1bZud+C7nY48qjE5P+Tc BkTTNcbtJmTHg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zheng Bin , Greg Kroah-Hartman , Sasha Levin , w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, samuel.thibault@ens-lyon.org, trix@redhat.com, salah.triki@gmail.com, speakup@linux-speakup.org Subject: [PATCH AUTOSEL 5.18 31/68] accessiblity: speakup: Add missing misc_deregister in softsynth_probe Date: Tue, 7 Jun 2022 13:47:57 -0400 Message-Id: <20220607174846.477972-31-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220607174846.477972-1-sashal@kernel.org> References: <20220607174846.477972-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zheng Bin [ Upstream commit 106101303eda8f93c65158e5d72b2cc6088ed034 ] softsynth_probe misses a call misc_deregister() in an error path, this patch fixes that. Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/20220511032937.2736738-1-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/accessibility/speakup/speakup_soft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c index 19824e7006fe..786dc5d080f3 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; } -- 2.35.1