Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25122539rwd; Sun, 2 Jul 2023 10:43:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+ck3BCYGMGxIkS3cxzsN65z2TpSTIo1iuiPDv6k78LHm/0UCCuAQIiyvrOlffxzuglYc0 X-Received: by 2002:a05:6a00:1d9b:b0:681:ed30:32e5 with SMTP id z27-20020a056a001d9b00b00681ed3032e5mr9593695pfw.0.1688319819839; Sun, 02 Jul 2023 10:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688319819; cv=none; d=google.com; s=arc-20160816; b=bCxBpclIj9NY3c2xwaon5Hv70hoP4p+IX8fqhzK4FGdpw8/bqIHHgljX/VvrBaa3oq lYcP7NqY/JZtuiJi54HWOHZE+bW1ukyAdHDKMcb2oDxCIO9iFFbkTM1w2eQK2TXnkRTI vEGctaP0cGwLhqlyj0/NxKJQVIejLgjEhOJofE9St6+A4WDvnrUBLuYkcxVSrMndd4IG xpBfGXpl1E+iG5GoLC8pA6l8SOZMqPDDo/3JmD/ElFeI6uXbhI0Rp0Hp+HhbvmdTLnDs tVOdcZlJ/SnPRlamfffZX2N44CLUYj1fLxUoO2QgRrCqogAVBU5QhmvpKP3Js/RySiET 9sgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yPM54quByN8fJuUSQfz/VIaSEo/AtH9BflFKPth17HY=; fh=SqCs7KZ8ytcbnkiRESvNRChZIthYOwhcUjFjEDfWP4k=; b=Xezslsn0eDu4fDEuzrq+DZxmitJi1dkIG+THTsJzl4+1gwsQWgjcrZ/nDZZnsGfwwV zFP1dfSKZ0q1YPvLtchRRtbsprgXVuxEKqY55mkrlWyWp6kxOVm4kMgzXMhYxfCe2nbK yoIL0MxZtwgEUuAXhSS7ZvAfiP1sN+f6wt9TddVpvEedm5X2EqLe4UDxh7VHi6+KEtSN 7aelS/5TDvT2gNMzFWa+2TjeJygN99mthGQa6CG7ANeH4rPpe6WXT245OgHjHGPss334 K65LP/R3Czh6ZHN5KYy+9gkeKWBX0kqz/B7BY06A2HCp2GlZ0EtlvxxQjrDroihdtOZG d1Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23-20020a056a000a1700b0067b77e7f473si12273037pfh.232.2023.07.02.10.43.21; Sun, 02 Jul 2023 10:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbjGBRhD (ORCPT + 99 others); Sun, 2 Jul 2023 13:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbjGBRhC (ORCPT ); Sun, 2 Jul 2023 13:37:02 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51DE0183; Sun, 2 Jul 2023 10:37:01 -0700 (PDT) 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 1qG10N-0007s9-Rs; Sun, 02 Jul 2023 19:36:59 +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 2/2] hwrng: nomadik - use dev_err_probe Date: Sun, 2 Jul 2023 19:35:03 +0200 Message-Id: <20230702173503.163152-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230702173503.163152-1-martin@kaiser.cx> References: <20230702173503.163152-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use dev_err_probe to print a message and return an error. This makes the code a tiny bit shorter. Signed-off-by: Martin Kaiser --- drivers/char/hw_random/nomadik-rng.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index 3774adf903a8..8c6a40d6ce3d 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c @@ -39,11 +39,8 @@ static int nmk_rng_probe(struct amba_device *dev, const struct amba_id *id) int ret; rng_clk = devm_clk_get_enabled(&dev->dev, NULL); - if (IS_ERR(rng_clk)) { - dev_err(&dev->dev, "could not get rng clock\n"); - ret = PTR_ERR(rng_clk); - return ret; - } + if (IS_ERR(rng_clk)) + return dev_err_probe(&dev->dev, PTR_ERR(rng_clk), "could not get rng clock\n"); ret = amba_request_regions(dev, dev->dev.init_name); if (ret) -- 2.30.2