From patchwork Fri Nov 11 14:56:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9423139 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 0AB4060233 for ; Fri, 11 Nov 2016 15:11:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CB0D29B85 for ; Fri, 11 Nov 2016 15:11:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01A0D29B86; Fri, 11 Nov 2016 15:11:29 +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 8626F29B83 for ; Fri, 11 Nov 2016 15:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933467AbcKKPLT (ORCPT ); Fri, 11 Nov 2016 10:11:19 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35119 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932961AbcKKPLS (ORCPT ); Fri, 11 Nov 2016 10:11:18 -0500 Received: by mail-pf0-f194.google.com with SMTP id i88so2657775pfk.2 for ; Fri, 11 Nov 2016 07:11:18 -0800 (PST) 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=IL4mWvE+h97Qf4ZhaN4fnpVbHoLgqFmeFkkAmLk7jGw=; b=Tcqy4NvT1MBxgIzxMqsCPRAphtliDGW/e6xhZ7k6yU/pOPWKBoi+kQ/dcKHOSJ8WvM 9nz5+IRZWxLsR3saVZhMojfnIJyEKHQz6SAZTsWgJ3BfmTDCuS0xLgqbecOCEc3URujY R+ButJDZqZBBmvsE8f+3uTeeUcIeZtXeuVimOFmhieMh+WZVwSt/agk7I8+yvZGDgJPn z45kw4Y0PxpV9ZLUiBhjLnFsgOnZtGry7loLVU+6A8ZFGyYase4ClvPPqJZ317DAf2Dk kDM636IkwlRFeBuvWkyzff1T5w+sEg/OO8OOrYI7C28t/93tM+WMOP/6vnxnArlW6fkc glNw== 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=IL4mWvE+h97Qf4ZhaN4fnpVbHoLgqFmeFkkAmLk7jGw=; b=JaERFfar/yE65spJpDDms5GnXMq++4+f7trabxob4r4cpIgWK6xvPJY64eEnmJjSV1 SZ1FAUgq9CbDp9xQ3KUfkehTdVcwnzyKlx2jnmh2Iz9myp8LzPH3oBkkdzpfuVSj+61m 0dBIIGDbQ0Yyi5B4HkDaNGLC0Uduj2m8uPOHCfo65OkDi34R5aOMX1wdhXDCHNy9Jbfu mynQP8Z9ZSRfqgv6d/9YgYAhwkt4u3/mqe2q7JQr7DRs25QyGqAVHatpZUCZzLZqJXJD F6aUfZ+dsbtBnF2Re1rjx2BTu1krzxbD1mKHUhgjLHsHZehE0CvqWqqVL+9xJ0EEKsoa T5mg== X-Gm-Message-State: ABUngvd75wwX0edgN0e7ZIxA6V5v/3uY4kjZytZ2PNug85NPZvPuR/N5K8sffIaFARIJlQ== X-Received: by 10.99.167.67 with SMTP id w3mr45991618pgo.1.1478876215324; Fri, 11 Nov 2016 06:56:55 -0800 (PST) Received: from localhost.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id b79sm15830358pfd.49.2016.11.11.06.56.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 06:56:54 -0800 (PST) From: Wei Yongjun To: Matt Mackall , Herbert Xu , Wenyou Yang , Nicolas Ferre Cc: Wei Yongjun , linux-crypto@vger.kernel.org Subject: [PATCH -next] hwrng: atmel - use clk_disable_unprepare instead of clk_disable Date: Fri, 11 Nov 2016 14:56:47 +0000 Message-Id: <1478876207-29820-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Since clk_prepare_enable() is used to get trng->clk, we should use clk_disable_unprepare() to release it for the error path. Signed-off-by: Wei Yongjun Acked-by: Nicolas Ferre --- drivers/char/hw_random/atmel-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" 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/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index ae7cae5..661c82c 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c @@ -94,7 +94,7 @@ static int atmel_trng_probe(struct platform_device *pdev) return 0; err_register: - clk_disable(trng->clk); + clk_disable_unprepare(trng->clk); return ret; }