From patchwork Thu Aug 24 19:40:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 136877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp1388577vqm; Thu, 24 Aug 2023 14:02:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2NrR6h4klku9rV12cbFtJ0uFVB/Xtswui/W18TTesSwii4O1GveJMHXlCH5tAah7CI1NH X-Received: by 2002:a17:907:78cc:b0:9a1:bb8d:7c9e with SMTP id kv12-20020a17090778cc00b009a1bb8d7c9emr6828726ejc.24.1692910953520; Thu, 24 Aug 2023 14:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692910953; cv=none; d=google.com; s=arc-20160816; b=Fkgui3BePcv7ziNxhY0JWn0GkIDGrem+kHxMsDFSSpPHN9c9xsMis2v5H/gsoJYPo6 l5PgaQjPF9HEdfacUxgj9NK2fSi/hwqvU6Uky0A406uKZpYyNX/rKg9IyGWUGFLoIs/r /LvxE7Jjt1KFtXth5KRM7lPt/10GBEo0CDh/d4q+VFaC1UVT/iMdJJW4C7FmZqUI3XLR SqXxvDtuUn7uXr7J1FCGuYx/mTDrFJu6IPgjo57nlultwXboddF84NY3uAu4nwonUvLv /mL713UfZub5GwQVkUWThApmu+eVnklJkaXWQPXmroy07fb0Flsaup7rmEZhba8sVTFH dKBQ== 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=SHEAkCSNEfMmz9nG4eTrBAFIrIIPg1TPx8wZuu5R8k0=; fh=SqCs7KZ8ytcbnkiRESvNRChZIthYOwhcUjFjEDfWP4k=; b=RXz/DfSmkkNxaOOexyVTjem3IrmerAvW6piGJmOQtkqOHBV09h4lDchZYJHX4dI++H czSse9mpMI6dizhNYqNReaXXCSZuP9a0bI4NErtdmbFsr3fAiBnN1x0He6ilrnqIrX81 cKMEkuSgEUun7f66v4nDs3XFM+yrxb94E3KoHif9EocGm2FNJ4NqnZSICYQXU0So0WwE Z0MIgQ6OjsZWHjhp143wAqNSBNQL3QvJo+36P7qKBX3rX47JcC3heK2gc34I187LFDGK hozRL8JRa2Krk47OsufGPHU8RNk87OxtBJ90clab/z91GDe2fECHKxyd/PuHmRyzPniX MaMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x23-20020a1709065ad700b0099304c10fd0si74741ejs.991.2023.08.24.14.02.09; Thu, 24 Aug 2023 14:02:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243347AbjHXToG (ORCPT + 99 others); Thu, 24 Aug 2023 15:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243290AbjHXTnc (ORCPT ); Thu, 24 Aug 2023 15:43:32 -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 17B1A1BE6; Thu, 24 Aug 2023 12:43:31 -0700 (PDT) Received: from dslb-188-097-211-187.188.097.pools.vodafone-ip.de ([188.97.211.187] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1qZGEr-0003HB-MF; Thu, 24 Aug 2023 21:43:29 +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 3/3] hwrng: ks-sa - use dev_err_probe Date: Thu, 24 Aug 2023 21:40:37 +0200 Message-Id: <20230824194037.1575276-4-martin@kaiser.cx> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824194037.1575276-1-martin@kaiser.cx> References: <20230824194037.1575276-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775145796425631895 X-GMAIL-MSGID: 1775145796425631895 Replace dev_err + return with dev_err_probe. Signed-off-by: Martin Kaiser --- drivers/char/hw_random/ks-sa-rng.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/char/hw_random/ks-sa-rng.c b/drivers/char/hw_random/ks-sa-rng.c index 70d21bf657ce..dff7b9db7044 100644 --- a/drivers/char/hw_random/ks-sa-rng.c +++ b/drivers/char/hw_random/ks-sa-rng.c @@ -228,17 +228,14 @@ static int ks_sa_rng_probe(struct platform_device *pdev) syscon_regmap_lookup_by_phandle(dev->of_node, "ti,syscon-sa-cfg"); - if (IS_ERR(ks_sa_rng->regmap_cfg)) { - dev_err(dev, "syscon_node_to_regmap failed\n"); - return -EINVAL; - } + if (IS_ERR(ks_sa_rng->regmap_cfg)) + return dev_err_probe(dev, -EINVAL, "syscon_node_to_regmap failed\n"); pm_runtime_enable(dev); ret = pm_runtime_resume_and_get(dev); if (ret < 0) { - dev_err(dev, "Failed to enable SA power-domain\n"); pm_runtime_disable(dev); - return ret; + return dev_err_probe(dev, ret, "Failed to enable SA power-domain\n"); } return devm_hwrng_register(&pdev->dev, &ks_sa_rng->rng);