From patchwork Thu Apr 14 13:08:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 561697 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EBF8C47094 for ; Thu, 14 Apr 2022 13:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344630AbiDNNtY (ORCPT ); Thu, 14 Apr 2022 09:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343757AbiDNNjW (ORCPT ); Thu, 14 Apr 2022 09:39:22 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 764752F01B; Thu, 14 Apr 2022 06:34:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id E3C01CE29B3; Thu, 14 Apr 2022 13:34:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0489BC385A5; Thu, 14 Apr 2022 13:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649943284; bh=knN+5Q7Xmx1iTi3Ru3PlZcbuiEyx86ubiS8hxYwuebs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZNQSGgngj1OZqu3+ljObtQOXT7/zJfUJy2tGKWHi0gGMpHyEQOYaLCQYG+AL6kr93 HgGA5Q51gJi4hyk9ood8ojbo2LMyVxNU8GkSZdYlQNE7aG72yMlZkei+D/FXN3Vubi jDe9jZmBGDpvRtQVhknqBwO5FGwLBNSVXdUqlqPk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Claudiu Beznea , Herbert Xu , Sasha Levin Subject: [PATCH 5.4 101/475] hwrng: atmel - disable trng on failure path Date: Thu, 14 Apr 2022 15:08:06 +0200 Message-Id: <20220414110857.981050314@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110855.141582785@linuxfoundation.org> References: <20220414110855.141582785@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Claudiu Beznea [ Upstream commit a223ea9f89ab960eb254ba78429efd42eaf845eb ] Call atmel_trng_disable() on failure path of probe. Fixes: a1fa98d8116f ("hwrng: atmel - disable TRNG during suspend") Signed-off-by: Claudiu Beznea Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/char/hw_random/atmel-rng.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index e55705745d5e..f4c94f8acfe0 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c @@ -96,6 +96,7 @@ static int atmel_trng_probe(struct platform_device *pdev) err_register: clk_disable_unprepare(trng->clk); + atmel_trng_disable(trng); return ret; }