From patchwork Sun May 29 07:07:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12864134 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EC6FC433EF for ; Sun, 29 May 2022 07:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=J3NvA5qUjOhztlh7kKE8fhdymAitoQyduSITMGYzG0k=; b=oG1xVCXrG0guyv yAZ764oqonuvKlqY36SveEN5zk62Qqk9gaMnHyVw6xbzxus7ChVP8MOr/+H9PyqQj+CGNApeNTCX9 jdrI2PRHpSyrwaYkt7a7OdK5sVhNmkd4AbtNjTGPSupJO1tovTbAmwL0IXIizatfOM8ak5bYuCMtm D0C2iaRZmgywP5nY0PG939OGwOKEYCvfDXKm8ZwIXSXEFLloRQvpMio8LPVhn5JwgiqdV1mttn1yw b7f92ptDmVQGo5rUlHrGpAs6Q+WrgHliu/ezzpGj8PqVvDMuz7I6wQdIv9VK4sX0LKBBCpiTL6mnG Zw/cnAVneoMhog40V8hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvD1u-003Qek-IY; Sun, 29 May 2022 07:08:02 +0000 Received: from smtp03.smtpout.orange.fr ([80.12.242.125] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvD1p-003QcX-QL for linux-arm-kernel@lists.infradead.org; Sun, 29 May 2022 07:08:01 +0000 Received: from pop-os.home ([90.11.191.102]) by smtp.orange.fr with ESMTPA id vD1cnY8S35ohRvD1cnA1jP; Sun, 29 May 2022 09:07:47 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 29 May 2022 09:07:47 +0200 X-ME-IP: 90.11.191.102 From: Christophe JAILLET To: Mark Brown , Heiko Stuebner , addy ke Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Mark Brown , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove() Date: Sun, 29 May 2022 09:07:43 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220529_000758_042505_E95B1117 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org spi_controller_put() is already called as part of spi_unregister_controller(). The latter is called automatically because the controller has been registered with the devm_ function. Remove the duplicate call. Fixes: 64e36824b32b ("spi/rockchip: add driver for Rockchip RK3xxx SoCs integrated SPI") Signed-off-by: Christophe JAILLET --- drivers/spi/spi-rockchip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index a08215eb9e14..70777731b20e 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -963,8 +963,6 @@ static int rockchip_spi_remove(struct platform_device *pdev) if (ctlr->dma_rx) dma_release_channel(ctlr->dma_rx); - spi_controller_put(ctlr); - return 0; }