From patchwork Tue Jul 26 14:53:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9248305 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 E044A60868 for ; Tue, 26 Jul 2016 14:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17E726D08 for ; Tue, 26 Jul 2016 14:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5CF827572; Tue, 26 Jul 2016 14:54:28 +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 8385B271FD for ; Tue, 26 Jul 2016 14:54:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756526AbcGZOyY (ORCPT ); Tue, 26 Jul 2016 10:54:24 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36596 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756142AbcGZOyW (ORCPT ); Tue, 26 Jul 2016 10:54:22 -0400 Received: by mail-pf0-f195.google.com with SMTP id y134so115616pfg.3; Tue, 26 Jul 2016 07:54:21 -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=J8BacKYJG0whKVapNt27n4yH9EPr8ilK4OCzuGyB9OM=; b=Qhvvtm0KotJnz3qtOPHOe/4lH+mwO9zGQZjhBlYly1ys5A2XfDjGIQP3buNhwU8I6R pyQm18J58fTU7em91ld/euOgNHSSxndwtPSHQJKlHvxSHkYK/zT+GdxpZDt66ks93qWn GngOdQM4F4iAnsscUx2xYuOcw3AfQ4Ep6yWpeCZzi44LEzfv1I8NGll1A6+ZISsyROed CuYOz/cRqx2ux/tmotuYOus2chxTP9AjQzlffvq2oatvB2q60Qp53qn/aRdPJM+b5cBN sTG4+jjp8HTshY/Q+N6UyONG7ugcrP3SpAqflXd4SnzIxPTaUXUhCdvX0nVrdtbTPd2m M5ZA== 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=J8BacKYJG0whKVapNt27n4yH9EPr8ilK4OCzuGyB9OM=; b=CYS2NCAU6RfugXqKmcMFGKUDRNNnTr3xb/B3uhE2kdkr8LtRT4kARUzz8uDp+532Xn 9uhnCjDeuph4eX67Gl4I516b0lVs+DL3aH7WMoiaBKS6aq2T0CpVDRWSaT4cyPSA0cqj GhkPkjGgEUTWj3VlJ+IgKTBv4dgxA+RHbGJjq29g4A7Fp1RF4c6rwO8QvjvBpAIqPwdG VrPIu8k+zApkmYb7Q67K/gQN/fTwgNytxssiqtk4Nm89LD8h+zFgtd56pUpIeonbYfXi nxD9SzsTSeJZ2i27Eb+kB/j3Q7vsSvexCB5dswCuH+9iXbjRQs5POOzeS1ESCXMRHcvk FbRQ== X-Gm-Message-State: AEkoouuHJHp1DEKkkB+PI0mxbewKqYbc3y8qwgPECqfhB+L4LvNbplJOFl4i1qFwCoa7Hw== X-Received: by 10.98.28.142 with SMTP id c136mr39998340pfc.131.1469544861188; Tue, 26 Jul 2016 07:54:21 -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 e2sm2272099pfd.45.2016.07.26.07.54.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:54:20 -0700 (PDT) From: Wei Yongjun To: Andy Gross , David Brown , Mark Brown Cc: Wei Yongjun , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH] spi: qup: Remove spi_master_put in spi_qup_remove() Date: Tue, 26 Jul 2016 14:53:53 +0000 Message-Id: <1469544833-32205-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 spi_qup_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in spi_qup_remove(). This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/spi/spi-qup.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-qup.c b/drivers/spi/spi-qup.c index c338ef1..7f15556 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1030,7 +1030,6 @@ static int spi_qup_remove(struct platform_device *pdev) pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); - spi_master_put(master); return 0; }