Message ID | 20240226185700.39411-1-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2287836dyb; Mon, 26 Feb 2024 11:27:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAqP6pmH2wz59//tx8wVynNcM4rPceP+d0LBz/fUjM9TFFoFTBDrC4DqVbk4+NZ0OdMiR8OM9+G1wFi4cIO8nmBSArVQ== X-Google-Smtp-Source: AGHT+IHm9vDx5N2Uh61PDZrBedUAtax4ijon4SM0CP4CKNEx/7RIcLz4CKOYQlmcbNJo+y8CIrbT X-Received: by 2002:a05:6a21:3a83:b0:19e:67b0:9ac6 with SMTP id zv3-20020a056a213a8300b0019e67b09ac6mr160912pzb.1.1708975627129; Mon, 26 Feb 2024 11:27:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708975627; cv=pass; d=google.com; s=arc-20160816; b=wlr+Du/GaSK9P58xvYJi6ctO5yy/+92NVn0qBUjhpp1uNIDMV9pPp7k9IX9KozCp06 fRY7Y+K3ws14N66lcu9gmkJUgxitJRQ1p6IFzuzl+eCODvpVQzriXWGNPP8ZN/g3wN77 tImcXPHcJGl/dvwM6ZgcjDwdOI5eh5nvUXo2kqDltvlwun874ErqWhaQZAEB4QhuT1v5 4Ve/pk3Ga7Cw4dLmZFfJaGBq6bUj/POGCizTqnkCVw3rKqV6swZvUclSnFrlRdpkyLUh Be8fxWbYTP1GhKMOI0ovl14LlXhuBBttfrdMPuMrd8X4oWtFjP2Un7XHP7SSkUTxcMji ErXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=yMYIvkqS8xxT349WCKvCBmcKEff+InSFVLgJewQXzkw=; fh=SqCs7KZ8ytcbnkiRESvNRChZIthYOwhcUjFjEDfWP4k=; b=o6COxOZZaX79he9ds89VvWMPhYoalG63kNMzLOteGG+LlsIi346altwzWwiSdQqUmn MZXuI5wtEXsPWgJMTxutakUe7Qx6mcIUZI7or/fJVJzp6kmQxYSVhflvKeXklgjvQM7L MP3ORd9c2Z24vkz62lgzcWC5pX9oZSYZC5hkxxK+wJ/RjZh7MgC+TMFQ72365KkKteF9 394Bj4XBBPzaF/6ALVK3vq+0u1GB/zEtNiKrONY0VdYcf0uqEHz6lvzUSRmR+jbodmWG xkSk5Qf8HQ3lQAdWGYbv1/ONuJG/Z+Xp0759KfJWm0nvuyr5I2JPamw1PV3Yn8HzS3m7 Oz5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kaiser.cx); spf=pass (google.com: domain of linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q13-20020aa7982d000000b006e4f1978902si4139771pfl.221.2024.02.26.11.27.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 11:27:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kaiser.cx); spf=pass (google.com: domain of linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82171-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 80977B2893E for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 18:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEA85130ACB; Mon, 26 Feb 2024 18:57:25 +0000 (UTC) Received: from akranes.kaiser.cx (akranes.kaiser.cx [152.53.16.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6C3812E1D5; Mon, 26 Feb 2024 18:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=152.53.16.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708973844; cv=none; b=Iimw4w8ccvKu68rrTDYtfGrh7BiKUv9EXRZ2qF1JOwRPn9f62xhRbTdjAwKkwF5cBiuZEPzYA+YE0mt+6Nux+GO6ufH0/4nOp591rmJWbdy22Qm4YPscoRtr0gPx8YLysFmWrg9uBL8Jx9jH4/hAfBaQuzFiVeylDMdka1xRM2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708973844; c=relaxed/simple; bh=XGFGDL2vkSkevkpwiN9gnwJy3m/FJ2fKnkPaSRjeF+I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EUHpc8MHXtcwTxd9gT6oK2scsiBhY54B2jl0p7x1LLhNI1d+0eJ+SgQKr3RtNJHm3k1QErueisKuMH4asih9jG4KKRzxgRgZIXGXrH8GAuOa7WBkVwi/GgfCz0/zbtAp/fcwlSMyLXqMNUPceak6/tnWBO/kwCVO7J36QPR1Y5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kaiser.cx; spf=pass smtp.mailfrom=kaiser.cx; arc=none smtp.client-ip=152.53.16.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kaiser.cx Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kaiser.cx Received: from dslb-188-097-209-155.188.097.pools.vodafone-ip.de ([188.97.209.155] helo=martin-debian-2.paytec.ch) by akranes.kaiser.cx with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <martin@kaiser.cx>) id 1reg9h-001h3u-19; Mon, 26 Feb 2024 19:56:49 +0100 From: Martin Kaiser <martin@kaiser.cx> To: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx> Subject: [PATCH] hwrng: hisi - use dev_err_probe Date: Mon, 26 Feb 2024 19:57:00 +0100 Message-Id: <20240226185700.39411-1-martin@kaiser.cx> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791990826867174856 X-GMAIL-MSGID: 1791990826867174856 |
Series |
hwrng: hisi - use dev_err_probe
|
|
Commit Message
Martin Kaiser
Feb. 26, 2024, 6:57 p.m. UTC
Replace dev_err + return with dev_err_probe.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/char/hw_random/hisi-rng.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On Mon, 26 Feb 2024 19:57:00 +0100 Martin Kaiser <martin@kaiser.cx> wrote: > Replace dev_err + return with dev_err_probe. > > Signed-off-by: Martin Kaiser <martin@kaiser.cx> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Maybe worth wrapping the line in this subsystem still strives for <= 80 chars > --- > drivers/char/hw_random/hisi-rng.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi-rng.c > index b6f27566e0ba..4e501d5c121f 100644 > --- a/drivers/char/hw_random/hisi-rng.c > +++ b/drivers/char/hw_random/hisi-rng.c > @@ -89,10 +89,8 @@ static int hisi_rng_probe(struct platform_device *pdev) > rng->rng.read = hisi_rng_read; > > ret = devm_hwrng_register(&pdev->dev, &rng->rng); > - if (ret) { > - dev_err(&pdev->dev, "failed to register hwrng\n"); > - return ret; > - } > + if (ret) > + return dev_err_probe(&pdev->dev, ret, "failed to register hwrng\n"); > > return 0; > }
diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi-rng.c index b6f27566e0ba..4e501d5c121f 100644 --- a/drivers/char/hw_random/hisi-rng.c +++ b/drivers/char/hw_random/hisi-rng.c @@ -89,10 +89,8 @@ static int hisi_rng_probe(struct platform_device *pdev) rng->rng.read = hisi_rng_read; ret = devm_hwrng_register(&pdev->dev, &rng->rng); - if (ret) { - dev_err(&pdev->dev, "failed to register hwrng\n"); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "failed to register hwrng\n"); return 0; }