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: 577427 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD0F7C433F5 for ; Sun, 29 May 2022 07:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbiE2HHx (ORCPT ); Sun, 29 May 2022 03:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbiE2HHw (ORCPT ); Sun, 29 May 2022 03:07:52 -0400 Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED6F78FD4B for ; Sun, 29 May 2022 00:07:48 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.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; }