X-Received: by 2002:a05:6a00:b84:b0:492:64f1:61b5 with SMTP id g4-20020a056a000b8400b0049264f161b5mr1430467pfj.52.1645648605587; Wed, 23 Feb 2022 12:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645648605; cv=none; d=google.com; s=arc-20160816; b=P4h5mIX1FvUIWXS6NZ0kwkXPjkPxKmnPR4HNXrlb8m7KtkWu3bQ91ZKy/xPlHyvIAc nan/kR6k8hyM4w/2JIV7yMGjElzXby5Nl6igQKbaytXtOYDrYQVnS4Cotl3EckzjOxca bBQMqnQGIBdFTesImk009BXYUmZKp1vjsurdNBCcEkBqnFSIm14C3aquSfWcU1F8SVpn tPUbU5bqvpwPTdxt2bVmTwFA5fyx9ieyxrGmWJfs6fzMIIpJa/Zp7SHzFjX6+pRw8s2i IfUyVsoEbuah0SRlsp8uiuIVf8rkX+nmtUvaQQGCwaCpwLWTi81S8KcrTHLan04CV+re d+jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=q+XgVCi4/v8nhn8VawC4RuwP0TYPEOQWKTHvRL/cCTM=; b=1FFkYCVySVIi2tcX/09dvXlTleFR0EUtnNpdHa2uiVBISwyf1XJEo4GrFYFviTixVP qjCjg28kT8y4SCtsbk9izTZkDnrvb+1cCDGnX1gHhWskXWlPaTb4oJut7vC2UINvJSAG CprPrLFu04UGGEMkqF+yqma98COZw2yokJGpk/ssh1NGhk+Utjc8GyCP1t+UPRgnqwXB uOgtpXw483OHR1fdtTx9rlXkGHckmRsGyP2jq3Tyo5D9SYafT8e9a06yLokQ2lFJt29L jvt2ADh7CLa/ocTDiSZI0HTqQm2qSw1F/BSesJzMK6MfwcPWnHGYKqpi62SSd7X98A4o EApw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a17090a468200b001bba4104bccsi3296536pjf.87.2022.02.23.12.36.14; Wed, 23 Feb 2022 12:36:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236405AbiBWUMg (ORCPT + 99 others); Wed, 23 Feb 2022 15:12:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235667AbiBWUMe (ORCPT ); Wed, 23 Feb 2022 15:12:34 -0500 Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50D11403D0 for ; Wed, 23 Feb 2022 12:12:06 -0800 (PST) Received: from [192.168.1.18] ([90.126.236.122]) by smtp.orange.fr with ESMTPA id MxzYnod5Y41cbMxzYni1iG; Wed, 23 Feb 2022 21:12:04 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Wed, 23 Feb 2022 21:12:04 +0100 X-ME-IP: 90.126.236.122 Message-ID: <794ed508-3703-3dc6-5c04-f9fec737f277@wanadoo.fr> Date: Wed, 23 Feb 2022 21:12:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] spi: add missing pci_dev_put() before return Content-Language: en-US To: Mark Brown , Qing Wang , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org References: <1644890407-65167-1-git-send-email-wangqing@vivo.com> <164558930131.1665159.11296485721987449047.b4-ty@kernel.org> From: Christophe JAILLET In-Reply-To: <164558930131.1665159.11296485721987449047.b4-ty@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Le 23/02/2022 à 05:08, Mark Brown a écrit : > On Mon, 14 Feb 2022 18:00:07 -0800, Qing Wang wrote: >> From: Wang Qing >> >> pci_get_slot() increases its reference count, the caller must >> decrement the reference count by calling pci_dev_put() >> >> > > Applied to > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next > > Thanks! > > [1/1] spi: add missing pci_dev_put() before return > commit: 4d986ffa036a773456476f70bd0fde2fb1330b7d > Hi, not sure that the patch is correct. Shouldn't the reference be released in the error handling path and in pch_spi_release_dma() ? Instead of *unconditionally* at the end of pch_spi_request_dma()? CJ