From patchwork Tue Aug 23 15:03:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9295791 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 8568F60574 for ; Tue, 23 Aug 2016 15:04:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7389E2891A for ; Tue, 23 Aug 2016 15:04:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6342B28C91; Tue, 23 Aug 2016 15:04:38 +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 0F0DB2891A for ; Tue, 23 Aug 2016 15:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbcHWPEh (ORCPT ); Tue, 23 Aug 2016 11:04:37 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36433 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752780AbcHWPEg (ORCPT ); Tue, 23 Aug 2016 11:04:36 -0400 Received: by mail-pf0-f193.google.com with SMTP id y134so8423837pfg.3 for ; Tue, 23 Aug 2016 08:04:36 -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=bPYRhDH2mB2zkgZwzKQ9g2yBr7XJqWSFc8LogCoocjY=; b=SsTakg7f8JVI1F0M47F3sgOj4231MUdWWi4qLYArBiyeUkxgEcCC31l5qyy9VgvP6y 8OKZQySytE8zGDf9/5/tOehDObihV87BEVC8Gd3IL8ZtuOuLHZTKcp9LDMkN2UoyoCAA 2OQ6bS0Dr061HdTLO9YAvPdX4VNJXwYshLwsvu+0Xv8OebhRSYvCcEOdy3BtY8S0NP91 jnzlpu98MgU5GQHEBBzU6WQIgDBpE4tayN4M5PxaqZh0S1uLVWH2N5YjMveMcm0Ggb1f RdYyumqVmFuHJETVGU30pwoecFlH5UCrfV9R9IRIs/cdxQd+Nc5CnP46G+DRCrkqis4F lUUw== 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=bPYRhDH2mB2zkgZwzKQ9g2yBr7XJqWSFc8LogCoocjY=; b=eaiI2hl5nN1Wy+/kb3bFsmx9pjMQFJCTwL2Drl3k7qQny6ozaFAhCHOmgHt4tKE7Js rpXrkdaGWzEsMJum9Ds/kiOJfkcqlYkrKGffq3zMAF8uORaYDGMAwRam8UhYW28aPQOA icM6Wp8ESteMrbQfQxjKnBz/Os+qyxwZIOhm3hCFoatGeLCiKUkTZRC/dJZjh+hM1b/A U5A9JdNiSpLuFIKLY51vn0Iu20r2eYSUjPJV32dnMhBilIKn/6wUdj+TZoHG9uLXcDho /dk9Qc89dlWMt5O5RCOxj8cm3k8fvukUK+kfP1/ovgb7DdPkJVtkV+i6wkUo3EKPY9G1 gKWg== X-Gm-Message-State: AEkoousUqtjJIINc+DGFdMDhZ2Ncx4N8CL6xUKC6cySzQTfxExOizXCIvlAKY9u9AILQDQ== X-Received: by 10.98.53.68 with SMTP id c65mr21290968pfa.66.1471964676174; Tue, 23 Aug 2016 08:04:36 -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 z10sm6506452pff.95.2016.08.23.08.04.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 08:04:28 -0700 (PDT) From: Wei Yongjun To: Mark Brown Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH -next] spi: spi-cavium-thunderx: Add missing clk_disable_unprepare() Date: Tue, 23 Aug 2016 15:03:48 +0000 Message-Id: <1471964628-31179-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 From: Wei Yongjun Add the missing clk_disable_unprepare() before return in the probe error handling case and remove. Signed-off-by: Wei Yongjun --- drivers/spi/spi-cavium-thunderx.c | 2 ++ 1 file changed, 2 insertions(+) -- 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-cavium-thunderx.c b/drivers/spi/spi-cavium-thunderx.c index eff2a13..8779377 100644 --- a/drivers/spi/spi-cavium-thunderx.c +++ b/drivers/spi/spi-cavium-thunderx.c @@ -80,6 +80,7 @@ static int thunderx_spi_probe(struct pci_dev *pdev, return 0; error: + clk_disable_unprepare(p->clk); spi_master_put(master); return ret; } @@ -93,6 +94,7 @@ static void thunderx_spi_remove(struct pci_dev *pdev) if (!p) return; + clk_disable_unprepare(p->clk); /* Put everything in a known state. */ writeq(0, p->register_base + OCTEON_SPI_CFG(p)); }