Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp771106rwp; Thu, 13 Jul 2023 00:11:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFJIALxxEKvPGppvzkH1xTQmR1uUSIoxzkZbS7TCquCY1UcgTsIGjxDPoGN5rjFBo0VU7G2 X-Received: by 2002:a17:906:9b8a:b0:978:8979:c66c with SMTP id dd10-20020a1709069b8a00b009788979c66cmr6609305ejc.18.1689232269817; Thu, 13 Jul 2023 00:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689232269; cv=none; d=google.com; s=arc-20160816; b=tiT4TxgdPTpG6YccdmNcdCfSSfWxvxO6YIudjr9Iq3F1GNg3T92ZPzlQCWKdi6o+Rv AzQ4f5M6S+4ECMnWp66MTJ9pASi/UibjOfBThEbvXrcTCaS56MAOZ4ZUemQARXFwQKmC bHWECWY95ZuLFhc2zAjA12iF/bf7yLn8nL4D9P26gV9S8CcuGz1lHW89solR0lB9SRtJ wsPD2rvd6oJF9ZMvdvZyuhRrsSi0UKdScOcKBwvxGsHllT8G9yHS305FgbIBolf7Bi/N F5QBK3wBcKUwlmezpX793aWeTm56cYnM1jvU/U7uf5sP1RxkiDRFffyjpmLf/5ZaxoHE +gEA== 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=vsKmDlYeSPZ8hEJhBgjErmEmqfrQmfr3rHGRf1SlCpA=; fh=E5JFeCCQh9Lu/4SbiHM0xXDZNRS+26I/orGAtH3zI6M=; b=ABFa7fUpVYYxsY4b2hmSP+bY0vNbTPgzXY/Ix5sYAfrvZZq0BrhxEFqDZybrZGNLIB Soev7xGvR4Tclv2MSJ91s5W2Tl4+/utLTncyYXewB17MfbCpSUONlV3GOLrriLw6sAP2 SAHurR4c75tS9UxtewuY3SafzvJYCbdLjS5S3db6SMA/GCzUibdzDUD8PyXRIn6Dyx5w tAWzPrFkpss8WOQXH4OcoG2UJrs0s/ReVjpJhYX7SsoNRr8Wfxb4Uf8jaJw7PiFT9pWX +Xl2gc25LTeAZulpCByF3arBSIit6Hl6i76f0Nx7JSFljvj7SUFelT++A55QDmB4BxvT Nq3w== 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 gl5-20020a170906e0c500b00992bfd14c42si6252482ejb.949.2023.07.13.00.10.42; Thu, 13 Jul 2023 00:11:09 -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 S234029AbjGMHGo (ORCPT + 99 others); Thu, 13 Jul 2023 03:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233945AbjGMHGl (ORCPT ); Thu, 13 Jul 2023 03:06:41 -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 35C9A172C; Thu, 13 Jul 2023 00:06:40 -0700 (PDT) Received: from 74.172.62.81.static.wline.lns.sme.cust.swisscom.ch ([81.62.172.74] 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 1qJqPN-0004KN-CF; Thu, 13 Jul 2023 09:06:37 +0200 From: Martin Kaiser To: Herbert Xu Cc: olivier@sobrie.be, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/3] hwrng: ba431 - use dev_err_probe after failed registration Date: Thu, 13 Jul 2023 09:04:46 +0200 Message-Id: <20230713070446.230978-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230713070446.230978-1-martin@kaiser.cx> References: <20230713070446.230978-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_PASS,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 the error message after a failed hwrng registration. Signed-off-by: Martin Kaiser --- drivers/char/hw_random/ba431-rng.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/hw_random/ba431-rng.c b/drivers/char/hw_random/ba431-rng.c index d2a9d16323a6..9de7466e6896 100644 --- a/drivers/char/hw_random/ba431-rng.c +++ b/drivers/char/hw_random/ba431-rng.c @@ -190,10 +190,8 @@ static int ba431_trng_probe(struct platform_device *pdev) ba431->rng.read = ba431_trng_read; ret = devm_hwrng_register(&pdev->dev, &ba431->rng); - if (ret) { - dev_err(&pdev->dev, "BA431 registration failed (%d)\n", ret); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "BA431 registration failed\n"); dev_info(&pdev->dev, "BA431 TRNG registered\n"); -- 2.30.2