Message ID | 20231120151121.60942-1-jiajie.ho@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d903:0:b0:430:37f2:e94a with SMTP id dt3csp2333694vqb; Mon, 20 Nov 2023 07:14:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IG14gaNSERoKBkRtAt3G14jphJKEV/5VsGWUY8R+TZWDSuq66PnnIMAxpyjNbBVKfcdYK8p X-Received: by 2002:a05:6a20:5d8f:b0:187:995c:1d74 with SMTP id km15-20020a056a205d8f00b00187995c1d74mr4540389pzb.55.1700493289980; Mon, 20 Nov 2023 07:14:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493289; cv=none; d=google.com; s=arc-20160816; b=iVyZL3AUedURz5Fs57Wju9AF5J+r9r8ui82t4WNeT3uiCgdBJUYs146qViwy86Rs5/ 2p7nNc4cj8D+WLxipudwwe6Pp0Ykua128/ghl+gt1IfcuB95SrWBjYxhHKD6ku1Umn1J 9kVgVGJrGtmKvTmhHqEVKEtr8j6uRsedY4IWfkeC4uObtqmduljWJbZySfgPGATEDTG8 kr2r+bM4QhDEVuI0dp1GQ9JnvTMPXRz1MTsB9fvy/kQNJ96IVk7NjTP8xTVAkd5Y9AhB 0b5DF0bQBfSe6Y41WZOB7mYCwO63NokOqqKAABtg0wDCWTDf4k5WkmWD3wC8CCEXU5Xo Tq2A== 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 :message-id:date:subject:cc:to:from; bh=LIFTNmaaP06Tkz8B93ccR3y4Jh/DXBVfEeSvC3JaVvY=; fh=Oz1MAFCAz6bm3P3Rh6SV8g6zQZa2LMAPpbOc5rC5mLU=; b=R92t3S0urY7Ctm8paplmYoZ/9yXHj65pPCMeMnbO8g9gdroMNNGMdBqDEA0tUwIUA3 Il9OpBSLsbI+z4w+aP7l7xugcyVsR34sw5/1v2cT+rK2LUZ46iG+b8ZdjNM8oTL2orXw hI5mg5Aovd6SpIawDIUfgPlh1MXrKlg0bJfcd0bVEQpUh8PgHVgwPUqnWQiinaUhMB+Y CYpiphUn4dC7YkUXZdRoV1We+vTX4PLzEj31CXxLOa1ZuEwStJXk6b6WQGW4fl1IMyN1 7kmVdJ53E3OySapKXfqGswZsOwBhGYW9mdu9Qdukl+9ogeZOL4E/qxLjaqRBSArSefYs JN1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u128-20020a627986000000b006935df301a3si7969233pfc.8.2023.11.20.07.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:14:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 50C8280909D5; Mon, 20 Nov 2023 07:11:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbjKTPLl convert rfc822-to-8bit (ORCPT <rfc822;heyuhang3455@gmail.com> + 27 others); Mon, 20 Nov 2023 10:11:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233764AbjKTPLd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Nov 2023 10:11:33 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF813122; Mon, 20 Nov 2023 07:11:27 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 351FC80A4; Mon, 20 Nov 2023 23:11:25 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 20 Nov 2023 23:11:25 +0800 Received: from ubuntu.localdomain (161.142.156.101) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 20 Nov 2023 23:11:22 +0800 From: Jia Jie Ho <jiajie.ho@starfivetech.com> To: Olivia Mackall <olivia@selenic.com>, Herbert Xu <herbert@gondor.apana.org.au> CC: <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] hwrng: starfive - Fix dev_err_probe return error Date: Mon, 20 Nov 2023 23:11:21 +0800 Message-ID: <20231120151121.60942-1-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [161.142.156.101] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 07:11:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783096451826291818 X-GMAIL-MSGID: 1783096451826291818 |
Series |
hwrng: starfive - Fix dev_err_probe return error
|
|
Commit Message
JiaJie Ho
Nov. 20, 2023, 3:11 p.m. UTC
Current dev_err_probe will return 0 instead of proper error code if
driver failed to get irq number. Fix the return err code.
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202311160649.3GhKCfhd-lkp@intel.com/
---
drivers/char/hw_random/jh7110-trng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Nov 20, 2023 at 11:11:21PM +0800, Jia Jie Ho wrote: > Current dev_err_probe will return 0 instead of proper error code if > driver failed to get irq number. Fix the return err code. > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > Reported-by: kernel test robot <lkp@intel.com> > Reported-by: Dan Carpenter <error27@gmail.com> > Closes: https://lore.kernel.org/r/202311160649.3GhKCfhd-lkp@intel.com/ > --- > drivers/char/hw_random/jh7110-trng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks.
diff --git a/drivers/char/hw_random/jh7110-trng.c b/drivers/char/hw_random/jh7110-trng.c index 38474d48a25e..b1f94e3c0c6a 100644 --- a/drivers/char/hw_random/jh7110-trng.c +++ b/drivers/char/hw_random/jh7110-trng.c @@ -300,7 +300,7 @@ static int starfive_trng_probe(struct platform_device *pdev) ret = devm_request_irq(&pdev->dev, irq, starfive_trng_irq, 0, pdev->name, (void *)trng); if (ret) - return dev_err_probe(&pdev->dev, irq, + return dev_err_probe(&pdev->dev, ret, "Failed to register interrupt handler\n"); trng->hclk = devm_clk_get(&pdev->dev, "hclk");