From patchwork Tue Jul 26 14:57:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9248313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4C5756077C for ; Tue, 26 Jul 2016 14:58:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DAA926D08 for ; Tue, 26 Jul 2016 14:58:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 327B22723E; Tue, 26 Jul 2016 14:58:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1DF226D08 for ; Tue, 26 Jul 2016 14:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756634AbcGZO6E (ORCPT ); Tue, 26 Jul 2016 10:58:04 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34033 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756706AbcGZO6D (ORCPT ); Tue, 26 Jul 2016 10:58:03 -0400 Received: by mail-pf0-f194.google.com with SMTP id g202so124354pfb.1 for ; Tue, 26 Jul 2016 07:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4qTaOXkDyav7WHlpHMCE14AB9pDTCKTyMkvy3RPKlyo=; b=Ny2OU9PQSauXMVJxyhfsqXBvcDhQlCzPYvM6JixFgwhudtEe/hAuFnRQObVhesuwUL 3N/ICgwFKFAstXHvUI7uSUAYiJr+FVUI9FvXARMUm8E2Trcle3TrhKf8lwyIW1LIAb3C QMvYe3qiSGZRNwWVmtaFZQFciU0Dv4hamESf6aDwNc+fKMDefnINJiO1hf0uV1qZEE0p U/567HciZ7zs5GknT1AvkVbc7b4jMbXxnP4Er0dWKAFACFiU5E2DfzMrmCHCcTU0y/5B UqXW47JQrdaxmqCgrhFJVX5Ziuml4k2bVGUiODyoE8Ug1CTjKDWOQexrDJR9CRbdyLVg qz8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4qTaOXkDyav7WHlpHMCE14AB9pDTCKTyMkvy3RPKlyo=; b=OKZD9+RFyDJ7spfgyVx2sMP39l2nV7yWEjtptJyzued3HlTKXJrlGln2nogaDdSJtj 2AfyDKAi7ArE3+DvU8XFmO1+tVXky0r3uclnx+IOyGqeUJnW/ucWaIX97Km6AejZ/eIK p3ZHGn2dL5RwBQsb005hQ3h1AfmoAwwBhktQWfOr9Y5VBrZ3aetq5IL89+S/Az49zbj7 b32y/S5io3g076R80+vedvf3nJBTp5O12+WoDGJR8LWeWJ6/eJeLBihfupGx04USEFoZ a4PnGVC8LMedU/nxT3Of0QaRZqyZoXpovRaq0GAv4RhQySWVy0dCWjjv2nG2pRoPsty2 NHIg== X-Gm-Message-State: AEkoouux2SzTHfC134xCQxxGJBuBkQsSP9xNK+vDR6MtBQBmV2hwri3T8pCIjF2WJURVwA== X-Received: by 10.98.149.22 with SMTP id p22mr40014002pfd.88.1469545082523; Tue, 26 Jul 2016 07:58:02 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id te10sm2363745pac.4.2016.07.26.07.57.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:58:02 -0700 (PDT) From: Wei Yongjun To: Mark Brown Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH] spi: img-spfi: Remove spi_master_put in img_spfi_remove() Date: Tue, 26 Jul 2016 14:57:55 +0000 Message-Id: <1469545075-32446-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The call to spi_master_put() in img_spfi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in img_spfi_remove(). This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/spi/spi-img-spfi.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index 823cbc9..7a37090 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -720,8 +720,6 @@ static int img_spfi_remove(struct platform_device *pdev) clk_disable_unprepare(spfi->sys_clk); } - spi_master_put(master); - return 0; }