From patchwork Tue Jul 26 14:56:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9248309 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 C07F46077C for ; Tue, 26 Jul 2016 14:57:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5B2F26D08 for ; Tue, 26 Jul 2016 14:57:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97D362723E; Tue, 26 Jul 2016 14:57:09 +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 5316F26D08 for ; Tue, 26 Jul 2016 14:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752785AbcGZO5I (ORCPT ); Tue, 26 Jul 2016 10:57:08 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33002 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbcGZO5I (ORCPT ); Tue, 26 Jul 2016 10:57:08 -0400 Received: by mail-pf0-f195.google.com with SMTP id i6so125077pfe.0 for ; Tue, 26 Jul 2016 07:57:07 -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=gZXBfOPPt014FJY/kUVA6ys+MwzYYx9pPJpG5vILqFU=; b=KO0N71g2U80m2edgmf5VTo1qMvUGcXyj31cRgvo5l0Aa/nsTsysaoefUeJqy77fPa5 E3H5hvm/Tn6DGUXxqkjjdMbdzyNFJzvOHe48wuGCuUF1ZKqqsQjiQexFwXSG/WiWgh9B 2CWIdxpOFU5xzVlIoataDppmUogkwnO9uo/yFZ5EHlyPKkYub/VSX3DT68jw3dYrA9lC n/deUtJ5BbGwyTrHA+h0TptmKg180Ky2F7fHliON2OvniPcUol/qzpy+/ujx/GKmZOzV UFyThswAxqK6j39F1qWr7CEv+QJiG0BlAFUh0pvqjsQQhGcc/6T8RrH0H3gfT0BsPBWW IF6w== 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=gZXBfOPPt014FJY/kUVA6ys+MwzYYx9pPJpG5vILqFU=; b=DJEvNZXeQFv+PTHKUops5Q45sBxPfe+XBiLcAkbPTaSTjhOAHzTHYMP4vgA/yAVdq/ H5A6WjRO742A34HL+4tSA4J0MG1Hd/MghQAK6gYNgrrdNN/Bdor4uIq3cPl1S01QTQDe vf8nOE2fdIjAlD9+PZ0fHSoBA7OIvjFG8OhPqfflDDCbyEv8SLSQY7/c8LwiOhKliN5A QS3uTnK0EyPUkhplCcoGXz/v5buQG0DhOBj2JdB3ONs5oAa9BxEE/slS99wtLNGa8NNv xsvC70GuZlW45urUjXwrpYFjsosXagfoyp5H6y6csiu/Zd1pGtRlyzYhhdRdqIxHUsFo JCeg== X-Gm-Message-State: AEkoouuNFptcU7QSZkeUqSOOr75EQ5CY0st1ebD3kI6AxWVQvU3KlDKHFuCGpcDeFL+ZQA== X-Received: by 10.98.20.201 with SMTP id 192mr40482653pfu.144.1469545026405; Tue, 26 Jul 2016 07:57:06 -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 ya6sm2259140pab.22.2016.07.26.07.56.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:57:05 -0700 (PDT) From: Wei Yongjun To: Mark Brown , Matthias Brugger Cc: Wei Yongjun , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] spi: mediatek: remove spi_master_put in mtk_spi_remove() Date: Tue, 26 Jul 2016 14:56:50 +0000 Message-Id: <1469545010-32327-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 mtk_spi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in mtk_spi_remove(). This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/spi/spi-mt65xx.c | 1 - 1 file changed, 1 deletion(-) -- 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-mt65xx.c b/drivers/spi/spi-mt65xx.c index 0be89e0..899d7a8 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -685,7 +685,6 @@ static int mtk_spi_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); mtk_spi_reset(mdata); - spi_master_put(master); return 0; }