Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6973967rwb; Mon, 12 Dec 2022 08:32:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qNrNOeUq2vwfHwlpOUrUKDiJGkejyBDfWrhJyYa2YL1UMITF9vgqmn68STMgkwWZWuPJE X-Received: by 2002:a17:90a:cf16:b0:219:861a:ac10 with SMTP id h22-20020a17090acf1600b00219861aac10mr16856093pju.6.1670862719761; Mon, 12 Dec 2022 08:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670862719; cv=none; d=google.com; s=arc-20160816; b=BLc2cJj3cDFm7ym8HBHGRY48Owagq/UzcnGOlVtGYa9ZXgfD5BPjHb0lkK0rz2NnMf Vht2RZ9O3J++NdWeF25423yVsRpPrz9UVM2AcZVgpVk5C5Q3o2aedFpU9O0Bhy7YYjmT ZRwntAnZ6bVB10kHeBPOTi/qLT1XLa6xDuVJ2luBh26DXzKhk+wJDs+zUscmSLSnzYKr VLMNZGNCksMmpHB844BFP0wCzg4khrf5p6BgVPIzk1FYXBDH0NcsvwnotemK3FV18Mi3 urIp9PTVju0Lo2qr93o2vvW4bPg1QZpE2WPPfiErIAQHP/QLDhYqTrK356htnznrXKdP +lkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0Kx8dmCP7wNrotpv2Hx2ia/WS0xvBiY7hoare97C4TU=; b=zwanlqrS5vdoVwOgfNzefl8eAwr2+3ZZf414IufuVNf0JAZtJKJVVAemSyhvLiJBuo umPLf9EM4mfh0vLqlJEw7zqgbwFjxsifO55ZxTvdXQqiWIspdDnZNFQcApJDnzMqX4Oo tUYTPDFDDeskrAm4/wsVxrUv/RHEMIXiiKZOc1dLrVqppC9/McS4oXslG+qL4K9fD9oi flHbF/D4aJ7E4kCCuw2Xx6ty6XLTWA+YO5Z+8l+4+EbnIJON115kKMOSv9WdMdpkgf8R xtpfkcN3fO7VYy1qx+TJJQmp/S/B3BCYKBscmbEmTKYzLMv36MzVmQ6Tl4jI+T53T3qA AK9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ankc2UWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw4-20020a17090b4d0400b0021a1b4ecfdbsi11164409pjb.63.2022.12.12.08.31.48; Mon, 12 Dec 2022 08:31:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ankc2UWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232338AbiLLPhJ (ORCPT + 74 others); Mon, 12 Dec 2022 10:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbiLLPg7 (ORCPT ); Mon, 12 Dec 2022 10:36:59 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1836F959B; Mon, 12 Dec 2022 07:36:59 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id B0BB2B80D53; Mon, 12 Dec 2022 15:36:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A28F1C433EF; Mon, 12 Dec 2022 15:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670859416; bh=3xjGxpTU+uAlErxm+6V13eo7pAhpayNah3d0WO3wiak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ankc2UWgSEwXXsJNdufE3nbPUAcqxg6QNkfU64wkwb5y1YetnuV1L037jyLlkva4X ohtZQhosg4nDJ7p5su7G34J7AWRTA7bJHWUC8Au61QKpSZ/sK0bLqxhQ49Tmjvtdrj 0TunmuHfbcuJrGLA66Z5an+mH9CUoj53HQsj10/2vDoXmbhJFE/H6GT9pTzSHYFHOy M2SMlVDPkdqiejzdinA/gI0OXHWo1kTKa/NDOt+ry9726IdKNQTlMckg/s0jzlBvpK j4BAooH92FmNo49cYOY7qSwPsJa58mJikw5h4Mh49MlUtEnmq6YSo7myQNRJXd8zaU 6CtYQXfXvMq9A== Date: Mon, 12 Dec 2022 15:36:51 +0000 From: Mark Brown To: Max Filippov Cc: Christophe JAILLET , Yang Yingliang , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-spi@vger.kernel.org Subject: Re: [PATCH v1] spi: xtensa-xtfpga: Fix a double put() in xtfpga_spi_remove() Message-ID: References: <7946a26c6e53a4158f0f5bad5276d8654fd59415.1670673147.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EHvVr8XnbtwPXPXJ" Content-Disposition: inline In-Reply-To: X-Cookie: It was Penguin lust... at its ugliest. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 --EHvVr8XnbtwPXPXJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 10, 2022 at 06:48:02AM -0800, Max Filippov wrote: > Hi Christophe, >=20 > On Sat, Dec 10, 2022 at 3:52 AM Christophe JAILLET > wrote: > > 'master' is allocated with devm_spi_alloc_master(), there is no need to > > put it explicitly in the remove function. > > spi_bitbang_stop(&xspi->bitbang); > > - spi_master_put(master); > This put is matching the get in the spi_bitbang_start. > It was discussed here: > https://lore.kernel.org/linux-spi/CAMo8BfJaD7pG_iutY8jordysjChyzhTpVSqpxX= h3QoZsj2QmaQ@mail.gmail.com/ Probably worth a comment though since it is a bit of a gotcha. Ideally we'd improve this in the bitbang code but that's harder. --EHvVr8XnbtwPXPXJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOXSpIACgkQJNaLcl1U h9BT0Qf+NdrWJWMDdjoqnd5CyDhVDKdBCD/mS40Y9yT/7kC/kmCpKV3k5xsYhfxl TLdaRq5V3JYZX9L/jCwANwlCm9+hFNp+X2BMeum0UnPQ3tqmf1HXUw1JudlRpb/7 k4h6vxqi5b4vd4bAeLztmRpN999BHuZPnR5lfbnCMLCJHGe2WIR63+fUJDVs20z4 sMLRCVN9hQbLN3qSp6CKdCdwPXrJf9O0H/2oLtwjEB2qG9F9Z3M9pHGBZceRR3tV hdhpXl1deQauicERPLIG5O1lXhTF5oqgU2Wx3qFfY1hlWykwBiumjFSNfDRkhYjO sff6XWL/4MqS9TkWh2YuDoxHeFscbQ== =sjZz -----END PGP SIGNATURE----- --EHvVr8XnbtwPXPXJ--