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: 9248311 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 76AE26077C for ; Tue, 26 Jul 2016 14:57:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6485C26D08 for ; Tue, 26 Jul 2016 14:57:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54D782723E; Tue, 26 Jul 2016 14:57:41 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8F5E26D08 for ; Tue, 26 Jul 2016 14:57:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bS3ng-0006Ke-5v; Tue, 26 Jul 2016 14:57:40 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bS3nT-0006Iw-IT; Tue, 26 Jul 2016 14:57:32 +0000 Received: by mail-pf0-x241.google.com with SMTP id g202so123255pfb.1; Tue, 26 Jul 2016 07:57:06 -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=jILoDw6sbRxHiNGY3nPrR5t542jzIQq4fBifS11FptlcKjqdJi796Uohfzs3S7XFiW Hd0T61w2DpXL6cJgVl5f9L8xcX/PnKymH26C1tmvMdwpMsTEQUjHb1yo3q9vc4kusYH8 l203G7gNUzzcveI5HOME9WHvySEIShVh/GydaRYq+Nhzo/YuV5RZMJoPTQt2FwGAcjva I8O4GGiV9POCcb1R3sOi09uKTJI+q5HRgpr13gjHZgcJpuSCjaf0P46piYiAwkDoOobh mvD/sXqkF10k1ISpzRCDGh6FG8eZSkxt1Aqa+IzYX7l4Ech3PHTVIS4ghr0Z3TH5nhPx LRcg== X-Gm-Message-State: AEkoouulo409iF4az/CkAHmTYnqfrZIXI4wK4ofL9aFs+uo2fe0zwt+//HJ/EpDxcaqYnA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160726_075727_631904_6D953F93 X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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(-) 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; }