From patchwork Sun Feb 5 15:49:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9556115 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 D7E6B602B5 for ; Sun, 5 Feb 2017 15:49:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7995262F0 for ; Sun, 5 Feb 2017 15:49:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B871626785; Sun, 5 Feb 2017 15:49:49 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 19FB5262F0 for ; Sun, 5 Feb 2017 15:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492AbdBEPts (ORCPT ); Sun, 5 Feb 2017 10:49:48 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36552 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbdBEPts (ORCPT ); Sun, 5 Feb 2017 10:49:48 -0500 Received: by mail-pg0-f66.google.com with SMTP id 75so6746257pgf.3 for ; Sun, 05 Feb 2017 07:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XqEja6rQQ/MzzSZa3fZzT+mePAVSzG2I3VeaH87qz2o=; b=uAHir+e4ia+VMknhDo2uW24QJB9YsytBhO+zN8ZgFdTOf7HHlqZdU/HMirMHLzfKM/ JFcG2OdGhaWDeob80yYszw+MXJ4k76LYi3Qqt9yh/rVyQ4G2qQD4MKIhjdTvTy4L6VnJ IE2J5TTDspxNkekciVRSub1pDTzPRvaU0gU1aE8Htu0sjnDGUnx5KbhV7gJ91hwM5Cyq pJ5sHfPLX9vo9I+KXZdFVg9gVYh+7yT/t8Dg5IHhg1ZSRUIRx5uTbV+df1JA+7Zz6+VU XGERG5sJ8OugIhVEw57wDPJ4gwqDE52Q7Ekg2pyWotIRwF91SxC+508z7l5vRQJ/ooI5 fqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XqEja6rQQ/MzzSZa3fZzT+mePAVSzG2I3VeaH87qz2o=; b=nhxAemNYMBfU5VHK66EyeQJiqA++TaO0BTyqCvdNrd4/dXuWdUK68deft1VhW6EPC9 XIUU3Dados2VPRUAz4HrVUszXH6jb0sD0P+91isfQYAuscCsD+gdCSmiphSOJbFtDLz5 YL1ZyuyMMpfIQrGi0RPnGpvQS+TlBjdrCfmdsCsrTAlifzMSGEPSLzLYS5Msgxv9wKaK 0fwpy7E4+UA07mprtPNpo65AMGbaWWPOtEt68mt9JNxQpGIla7dUmNXg64PZs/vmr5Vd 6GT5k1jtqcllbVcObI7OLBGFcJuP8tXwWOGzKMlofT71lMQPML9MVYRAhlYSXxz3wBdx Q7wg== X-Gm-Message-State: AIkVDXIaHATh9UrPoH5yjBhg9WgdoPUEOwAHiB715UsARIs/egVNzwS8OiceXvhUlOYpFQ== X-Received: by 10.84.218.205 with SMTP id g13mr10929638plm.78.1486309787442; Sun, 05 Feb 2017 07:49:47 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id m12sm82716781pgc.46.2017.02.05.07.49.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 07:49:46 -0800 (PST) From: Wei Yongjun To: Mark Brown , Romain Perier Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH -next] spi: armada-3700: Remove spi_master_put in a3700_spi_remove() Date: Sun, 5 Feb 2017 15:49:40 +0000 Message-Id: <20170205154940.965-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 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 From: Wei Yongjun The call to spi_master_put() in a3700_spi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in a3700_spi_remove(). This is detected by Coccinelle semantic patch. Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller") Signed-off-by: Wei Yongjun --- drivers/spi/spi-armada-3700.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-armada-3700.c b/drivers/spi/spi-armada-3700.c index e598421..2c7363a 100644 --- a/drivers/spi/spi-armada-3700.c +++ b/drivers/spi/spi-armada-3700.c @@ -901,7 +901,6 @@ static int a3700_spi_remove(struct platform_device *pdev) struct a3700_spi *spi = spi_master_get_devdata(master); clk_unprepare(spi->clk); - spi_master_put(master); return 0; }