From patchwork Sun Jul 2 17:35:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13299264 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88076EB64D9 for ; Sun, 2 Jul 2023 17:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PZMX9ABNWqJrVF0YkpQPPNNTzJLkUzgxJ064HljM2pI=; b=ykP3lxGI5m9ZiQ WcCp7o9ItUmXbzDXQDC06eWICmlPUxi3cKwnTydp9T+El3wH/y1ZYLjlyvugQNiCe+WP0+uPe8Mcb OeBwtVCv/eN2W1u97z5YWXKA1LdAdIo0GUuK25248uv/0zNNN7IMpOU2g2nrfNrGqGdAzpeYIXp9a anFdHYQYPshBxuyO5kdzyf45MnZH2lRYYJ4sDHU5c0NS0N49E/hEDGVGyuue3zwQX2iqWzOhhHCg7 IabOz2aW5tFJN2Y8/eIsfC5GupL2yJPYHxuessXs8sYxPZ/aoeAxPjlQOsWvndRf/i2xsx5YlviBJ jT5BsuaAN86Q7HECOeHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qG10Y-008Cth-1Z; Sun, 02 Jul 2023 17:37:10 +0000 Received: from viti.kaiser.cx ([2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qG10T-008CrA-1n for linux-arm-kernel@lists.infradead.org; Sun, 02 Jul 2023 17:37:08 +0000 Received: from dslb-188-097-041-125.188.097.pools.vodafone-ip.de ([188.97.41.125] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1qG10J-0007s9-RR; Sun, 02 Jul 2023 19:36:55 +0200 From: Martin Kaiser To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 0/2] hwrng: nomadik - two simple cleanups Date: Sun, 2 Jul 2023 19:35:01 +0200 Message-Id: <20230702173503.163152-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230702_103705_743558_58A24AB7 X-CRM114-Status: UNSURE ( 5.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use devm_clk_get_enabled to fix a (theoretical) race condition during removal. Call dev_error_probe to print an error message and exit. Both changes were compile-tested only, I don't have this hardware. Martin Kaiser (2): hwrng: nomadik - keep clock enabled while hwrng is registered hwrng: nomadik - use dev_err_probe drivers/char/hw_random/nomadik-rng.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-)