Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2294885pxb; Wed, 9 Feb 2022 15:25:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx96foBHy8YDZJmf0Et4K5uw61CXyLhqvrVEVeerocLwguRBvoYereQoYNtWif0sWD50BdP X-Received: by 2002:a17:90b:388:: with SMTP id ga8mr5269031pjb.137.1644449121087; Wed, 09 Feb 2022 15:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644449121; cv=none; d=google.com; s=arc-20160816; b=a1rMjGf9/ha5SrndQpybiHTyRtMBhWMzSxP7LP024CMJs32f7PYoKaWOVH3/0oZfbU csgEFKOoQXCSfk2xzj0U+/5y0otvH7WPHb0a4ijRIvH+JEOF3nPn+IjMLFvyn859pU/+ jvx0Gy1KrRl9SAHmQfB0rDzpOcn2QQ12xsZni4vbxwwYPWJiKtwmzU+e78FT0CR/hDPC GMssoLvj+WS1IRlTh6tH9jgkO79CcVPgvm+kIXBb/GRqXc/GVYq6dPE6PdA+fyn+e5OW g9bg5m4IjvLbG2L/s3TOvzwm96brQUe/D1ybS9GguecgHC3oS0HuHsoeFZTy5yquXcEe XDAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=34Ff6kfLT0xSKmkzxUsb0T6hrftpgKmDpLmWPWJfuQE=; b=dvYe9Sz9WNy8yz40BYFS9j2E00oNItr0i8F960N9pSXpCiAGzVDbXEmZAO/BpI8Vhq clo38zuo/FSUg1HDW4XuknVmix2dK15ef9nxvkDYtbKmDmZa9O5Il9HKO1kfGFWG6Vxx pD4OKQWskLZRKAQxP+A9DKf9Dofrm3Oh8PnOe+meXGeMNZGsUB5rKaUgdJBydJAUKEEw pROBsqCB+nGh6vULKPJG5DMJpnnyaEPWkM9Q+p1DCo+e5oi3YW8bsrKBkC5xdNep1qg+ mvWIS1cP81W7DbrJJe0ozLI2NAKV/MKsmxC2+K1fByMP//B/ALp/q8z3aFLa4I75pCAo dOyA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w17si331258pll.453.2022.02.09.15.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 15:25:21 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6118BE066E31; Wed, 9 Feb 2022 15:19:47 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233781AbiBITSL (ORCPT + 99 others); Wed, 9 Feb 2022 14:18:11 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:52722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbiBITSH (ORCPT ); Wed, 9 Feb 2022 14:18:07 -0500 X-Greylist: delayed 502 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 09 Feb 2022 11:18:00 PST Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [IPv6:2a00:da80:fff0:2::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBCDC00693D; Wed, 9 Feb 2022 11:18:00 -0800 (PST) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 47EA71C0B7A; Wed, 9 Feb 2022 20:07:02 +0100 (CET) Date: Wed, 9 Feb 2022 20:07:01 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Miaoqian Lin , Mark Brown Subject: Re: [PATCH 4.19 77/86] ASoC: fsl: Add missing error handling in pcm030_fabric_probe Message-ID: <20220209190701.GA10459@duo.ucw.cz> References: <20220207103757.550973048@linuxfoundation.org> <20220207103800.195504006@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <20220207103800.195504006@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > commit fb25621da5702c104ce0a48de5b174ced09e5b4e upstream. >=20 > Add the missing platform_device_put() and platform_device_del() > before return from pcm030_fabric_probe in the error handling case. Are you sure? > --- a/sound/soc/fsl/pcm030-audio-fabric.c > +++ b/sound/soc/fsl/pcm030-audio-fabric.c > @@ -90,16 +90,21 @@ static int pcm030_fabric_probe(struct pl > dev_err(&op->dev, "platform_device_alloc() failed\n"); > =20 > ret =3D platform_device_add(pdata->codec_device); > - if (ret) > + if (ret) { > dev_err(&op->dev, "platform_device_add() failed: %d\n", ret); > + platform_device_put(pdata->codec_device); > + } > =20 > ret =3D snd_soc_register_card(card); > - if (ret) > + if (ret) { > dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret); > + platform_device_del(pdata->codec_device); > + platform_device_put(pdata->codec_device); > + } > =20 > platform_set_drvdata(op, pdata); > - > return ret; > + > } Besides interesting whitespace, this will happily do platform_device_put() twice. I suspect it should return or something. This does not look right. Best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --SUOF0GtieIMvvwua Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYgQQ1QAKCRAw5/Bqldv6 8r6yAJ0b32yBnFzeOQ+ZKSYI5cF+pD0jXQCfUFZuWjyWGVZtzMvCNHmWiEODMZs= =FNvY -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--