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 AD246C43334 for ; Wed, 8 Jun 2022 21:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235163AbiFHVIi (ORCPT ); Wed, 8 Jun 2022 17:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234646AbiFHVIf (ORCPT ); Wed, 8 Jun 2022 17:08:35 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E09D022736E; Wed, 8 Jun 2022 14:08:33 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 802711C0BB5; Wed, 8 Jun 2022 23:08:30 +0200 (CEST) Date: Wed, 8 Jun 2022 23:08:30 +0200 From: Pavel Machek To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Zheng Bin , Greg Kroah-Hartman , 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: Re: [PATCH AUTOSEL 5.10 21/38] accessiblity: speakup: Add missing misc_deregister in softsynth_probe Message-ID: <20220608210830.GA1306@duo.ucw.cz> References: <20220607175835.480735-1-sashal@kernel.org> <20220607175835.480735-21-sashal@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20220607175835.480735-21-sashal@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Zheng Bin >=20 > [ Upstream commit 106101303eda8f93c65158e5d72b2cc6088ed034 ] >=20 > softsynth_probe misses a call misc_deregister() in an error path, this > patch fixes that. This seems incorrect. Registration failed, we can't really deregister. I checked random other caller of misc_register(), and it does not seem this API is unusual. Best regards, Pavel > +++ b/drivers/accessibility/speakup/speakup_soft.c > @@ -390,6 +390,7 @@ static int softsynth_probe(struct spk_synth *synth) > synthu_device.name =3D "softsynthu"; > synthu_device.fops =3D &softsynthu_fops; > if (misc_register(&synthu_device)) { > + misc_deregister(&synth_device); > pr_warn("Couldn't initialize miscdevice /dev/softsynthu.\n"); > return -ENODEV; > } --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYqEPzgAKCRAw5/Bqldv6 8iKSAKCAku6qb+5NjpqdOMca0bsNKBgj/gCfYTbZIhGE/FQarjaj1ZwM7wkIZik= =fD/V -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--