From patchwork Tue Apr 19 17:22:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 104944 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1982707qge; Tue, 19 Apr 2016 10:23:07 -0700 (PDT) X-Received: by 10.98.88.68 with SMTP id m65mr5700540pfb.4.1461086587750; Tue, 19 Apr 2016 10:23:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si7145818pai.159.2016.04.19.10.23.07; Tue, 19 Apr 2016 10:23:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754634AbcDSRXF (ORCPT + 29 others); Tue, 19 Apr 2016 13:23:05 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54850 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753419AbcDSRXC (ORCPT ); Tue, 19 Apr 2016 13:23:02 -0400 Received: from debutante.sirena.org.uk ([2a01:348:6:8808:fab::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1asZMZ-0000GX-3E; Tue, 19 Apr 2016 17:22:59 +0000 Received: from broonie by debutante with local (Exim 4.87) (envelope-from ) id 1asZMV-0002qG-BF; Tue, 19 Apr 2016 18:22:55 +0100 From: Mark Brown To: Liam Girdwood Cc: linux-kernel@vger.kernel.org, Mark Brown Date: Tue, 19 Apr 2016 18:22:54 +0100 Message-Id: <1461086574-10886-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.8.0.rc3 X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 Subject: [PATCH] regulator: tps6524x: Fix broken use of spi_dev_get() X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The tps6524x driver uses spi_dev_get() to take a copy of the SPI device it uses but has no obvious reason to do so and never calls spi_dev_put() to release the reference. Fix this to just a straight copy. Signed-off-by: Mark Brown --- drivers/regulator/tps6524x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.0.rc3 diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 9d6ea3a4dccd..67cac2682f50 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -600,7 +600,7 @@ static int pmic_probe(struct spi_device *spi) memset(hw, 0, sizeof(struct tps6524x)); hw->dev = dev; - hw->spi = spi_dev_get(spi); + hw->spi = spi; mutex_init(&hw->lock); for (i = 0; i < N_REGULATORS; i++, info++, init_data++) {