Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4359165rwb; Sat, 10 Dec 2022 07:34:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4q7VIGAeeyPW5NSOfNLr4G0y4SAGnFmoSvG72GdyFzbydxEBWTCgTGp6IylI79SA3ObfX9 X-Received: by 2002:a05:6a20:1389:b0:aa:806:7b91 with SMTP id w9-20020a056a20138900b000aa08067b91mr15863559pzh.39.1670686441254; Sat, 10 Dec 2022 07:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670686441; cv=none; d=google.com; s=arc-20160816; b=VX3f4PECvt5/M5SoOgE3jWpo85dbRZxlG4EcWqL321szNMpi6CPqbqi3nrywq0959h v4H0jqDvUKhCg/5r2lqcIjT2IFLA6VOiHlXvrsfGzMM2xo+2vavkv7HPA9B2iWOexcPB JU37sRbY0dOqM69YiULOLGXH35riBy5C6T16kuFuB4dGUgjDgHHJBEK4PXzbS3TR11gw Yp6vqBV6PmJFowbzD8SIplcArDu1l8Ymzl7+UHQAzPvIGB+0GM7sxMWfSGbxP0SfcVex zhg2/V50OPXCwOVsJPDjpHl8LFoCvFoQb8NVysIY8uXoU4INhBx5RrhBAFXKn5AeKXD0 tUuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nwNMp0YAJGSQ7QKo5n56cmMH5UND+SgKbR3yvLQLo2E=; b=Gkeij6/OGkGVpwOnD2J4pNB+NzNylUq7bJWKAY/jo1BdsMrL+KAwBHwP4ntM6EUCtv 4qNizErtOz/R6NsY7Iqbf3S8MOQLiLc3+1oj+sD9Dp3vK9CvvGe8oN7GZUdzybt9EkmR dA8XzFGAC3DCBvaDVx0/p2txIUSjiFb0he5bD8Z0FhyflDHxdLp4rZTJk67+q5RUi1i6 zkGGAt8EPstsvSblQBvNucKj1+Vch+KPy+sALsfNkfl0sLFifO7cg8zZZbvNUVBUqqsS U8dtkX2QVkI6yX2920Ug54hBrIIx0JfejYYJeoSs7FikDwKZ00Zf08ZiQ0zfA/6tVPGL kxJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NES8jTbw; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t191-20020a6381c8000000b00478f30df08esi4782942pgd.220.2022.12.10.07.33.45; Sat, 10 Dec 2022 07:34:01 -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=@gmail.com header.s=20210112 header.b=NES8jTbw; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbiLJOyJ (ORCPT + 74 others); Sat, 10 Dec 2022 09:54:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLJOyH (ORCPT ); Sat, 10 Dec 2022 09:54:07 -0500 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E222C1A053; Sat, 10 Dec 2022 06:54:06 -0800 (PST) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-3b5d9050e48so88240417b3.2; Sat, 10 Dec 2022 06:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nwNMp0YAJGSQ7QKo5n56cmMH5UND+SgKbR3yvLQLo2E=; b=NES8jTbwBCd6vpzlC4z4+szxha9oaVY0zluEA5jek8x6wxfyr8/6LXllc3mdXa4RAD 4+SBu38pXcD45beSY2tIFKophRRBB+Cy4j3VSxn7fPC7cmsCBtCza+uApZuap2f7CDiJ pP0Hu5pZeUM2Ac+4cL+AoguM3nktWEOgCtt6JYcXFVkWcznp/lBGKgefTGSQ3/793dkg p4mrQbWdTx/2jo0NtjbNZmQNvaCFOwCYUapzQeF6IMw8ZSrgqDmSfBIxkA9GikZ4t7cX +nWRwST/1Gb6Ctb3yHG5hgGf42UX5qpRL+C9l2A+Idfr6EFL8SSlK+9UzQbEh7SDWt7t h4cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nwNMp0YAJGSQ7QKo5n56cmMH5UND+SgKbR3yvLQLo2E=; b=5RcMgsimDC6VLCOPmFurngasv8ENoEzySPOJ651k+bdhE/KcY6tFUBZQekVqQewBq+ +n7KygRoXJE3ius+ljv53pcJOC3ngYPnFo0yR6M+989pRqm5ftThSrC71STDGLK7VDFL shsrK4xZDtj7Ae+meR11aQoNzktoKcWK1FKahIcuM2XjqlZ8bno/WXwDG9XAS+8wbp9w treEQ7v0zWx8agHMfdAbwOoZIBOgJpME3b4tyg6xtWozfWJjod4ZcxJaL2wWQLPR2P5t z7JfqqaXE86U8I3kC/YssaNYY3LCNvPvkl4smxXN+Ft+htkBuxRm97Jm4j3gImrOUgbF uKfw== X-Gm-Message-State: ANoB5pl9TYXu8DdYF4CY56HEljFcMWE7ac0vjh++pokyTSNKbRO9b0il d08OGJZoWCBFdp4T9agrkzkX6VRj7M8RRV1EviF5/ZDu0Gk= X-Received: by 2002:a81:94f:0:b0:3da:3a9a:ef5d with SMTP id 76-20020a81094f000000b003da3a9aef5dmr33020129ywj.504.1670683693882; Sat, 10 Dec 2022 06:48:13 -0800 (PST) MIME-Version: 1.0 References: <7946a26c6e53a4158f0f5bad5276d8654fd59415.1670673147.git.christophe.jaillet@wanadoo.fr> In-Reply-To: <7946a26c6e53a4158f0f5bad5276d8654fd59415.1670673147.git.christophe.jaillet@wanadoo.fr> From: Max Filippov Date: Sat, 10 Dec 2022 06:48:02 -0800 Message-ID: Subject: Re: [PATCH v1] spi: xtensa-xtfpga: Fix a double put() in xtfpga_spi_remove() To: Christophe JAILLET Cc: Mark Brown , Yang Yingliang , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-spi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Hi Christophe, 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. > > Fixes: 478cc2fc3dd7 ("spi: xtensa-xtfpga: Switch to use devm_spi_alloc_master()") > Signed-off-by: Christophe JAILLET > --- > drivers/spi/spi-xtensa-xtfpga.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpga.c > index 2fa7608f94cd..271ae98f441c 100644 > --- a/drivers/spi/spi-xtensa-xtfpga.c > +++ b/drivers/spi/spi-xtensa-xtfpga.c > @@ -123,7 +123,6 @@ static int xtfpga_spi_remove(struct platform_device *pdev) > struct xtfpga_spi *xspi = spi_master_get_devdata(master); > > 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_iutY8jordysjChyzhTpVSqpxXh3QoZsj2QmaQ@mail.gmail.com/ -- Thanks. -- Max