From patchwork Wed Aug 28 12:25:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Ruibin <11162571@vivo.com> X-Patchwork-Id: 13781234 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7492BC54FA6 for ; Wed, 28 Aug 2024 12:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Ojy4rbHwUy1jJhwVF5dBJZzOpMUBmKIqj2Otzsnr1T4=; b=xGQ4tmv8zVUTXkgA1mYbJM0hAZ eEMiMMySETAowZu4D9oeli/weRTZFmwkIU8aP9mqzy5wE7Wtk8HR+FRSbvUKfpGw/34Gka3LrOtQQ 8Oo0w4JOFS8fkyx35tyKyLft3EoBoG+QNL7w/krZgHqUM7kKG4rjzg3dDkHj0JHK3yq5ikb/SH8U0 vr3AeTwAM4SCZx2IKxgzfkuWVYVLSzVey0QqQRovCY66+sNXqUY99NMWM+6vKPkvpKdL98ikDd8SZ wDAaZry1vKNYOvHlYvEr4ndBpg/Ngr63enpJP/IsUjQpD8xlIej1iRUxqVSzMm9+aVVvhOTuX9ZtT VLiMbAng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjHkm-0000000FImG-0Oek; Wed, 28 Aug 2024 12:26:24 +0000 Received: from mail-psaapc01on20607.outbound.protection.outlook.com ([2a01:111:f400:feae::607] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjHjv-0000000FIYC-1go9 for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 12:25:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HG3aNLYQrnh9csDHnkaNxWmFQbsK0lVtKmTd1+AmpwWgiHRCqULJC1+BRhANw6PoAuW2iZLIKtoE2PLZAqQ3T0f09Ak7X6zyj011qXpUu3SUY5PVWUM5kW/nDRhQ1iBJqGm2zvlelNz6mrxEzodtD3efGLZGmvJvdWaVV8yJ36ZyDpR3ghXPjoQVxoJnvK2CMMwURq4wdVwIxo5MRK8/wcwi3Vbxc+s81G5xTtOEYswlYH7+KymGRzgzerm8lzcClgM07UsGYLcHt7j+3SAjeDGezYOEgXpM1+QK+UIfP1hzT3BiWmd8Hz5iLii/KUM92XCXpqdXYUUu1sUt9ECq0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ojy4rbHwUy1jJhwVF5dBJZzOpMUBmKIqj2Otzsnr1T4=; b=Cx6a5hdOOC/7901rFBvm0RPwVGDPVM22cj40tL+APpMVti7uZ81xOfvbdkGQhprs+8cJDT2pMuZsLA27NNrZhGeDmLL6BfOvtJGCSty92ZqW9j5R7zfDxfqrhYFNBMSj046Wfc7U31ZJiQ8aCft7EoAJnbUIyeIQNULafi8shspWtDFuMV8DamS8ECedqaDiA4gEuvccHpf2sxOVuWjj280NSOGZiPz2C1/UOz4LBD9rPfxxVXFtpJYMyPABjvEmVxl2Dwb4IZQLzVnl5cmSL8AeRvPqvLVoVkEJ79XUdkUoQPA/m3ItmdZ1Ifn0rCAsh8Q6K/91bTXE2uPaEPqFdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ojy4rbHwUy1jJhwVF5dBJZzOpMUBmKIqj2Otzsnr1T4=; b=dXxDIhaTWmVIKNDsyxotwBRzGZ6iOGGrPhS5BBOGJ+WyNWkE2f1NAQy5vjG2/I0BPciKD2mWVGiVAbNMRYvhunzlWxenylMudocd1+I8tLjn/XH7a5kFiSdgUzc2PMAQy6SgHVeGO43LqqWgvLzfAqTpWSZS57EFTdLhRsFrmJibr3eSFZD/1VHoMOPvBkmchKXv4HHwY/s0o8+jzxUI24htxQ7zpgIyhnFT6OP7vCPWxBHFL6KinxeBnITufTO9I3cNe5ZtGr3GjmLHCC6qFoeyHAJY5Nq6w3JutSYjveFNLXgFar+OFBVje+p5xF+yYDV/ssLcsgrrESyCiydZDA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) by TY0PR06MB5625.apcprd06.prod.outlook.com (2603:1096:400:32d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Wed, 28 Aug 2024 12:25:18 +0000 Received: from TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268]) by TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268%6]) with mapi id 15.20.7897.021; Wed, 28 Aug 2024 12:25:18 +0000 From: Yang Ruibin <11162571@vivo.com> To: Krzysztof Kozlowski , Alexandre Belloni , linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Yang Ruibin <11162571@vivo.com> Subject: [PATCH v1] rtc: rtc-asm9260: Switch to use dev_err_probe() Date: Wed, 28 Aug 2024 20:25:07 +0800 Message-Id: <20240828122507.1323928-1-11162571@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SE2P216CA0053.KORP216.PROD.OUTLOOK.COM (2603:1096:101:115::6) To TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6263:EE_|TY0PR06MB5625:EE_ X-MS-Office365-Filtering-Correlation-Id: a89fa828-05c8-48fd-2b99-08dcc75c7a94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|1800799024|376014|38350700014|81742002; X-Microsoft-Antispam-Message-Info: wTtbtWi609/ZAH+1ubJWixWW7hUjSWAaYgaCTx1CtEWjGO+nkZXIndMKbUE05hEl0JF/1v5o3yU1V/TvKIJPq5W0zZFJyj2KHfAtynhx/5onL6RYljdy5EKhH//9KnYGAibdn5UKBbbHipFOWDcOmOgnMZsvp2rXYVprgk6Qb76SiOO3TaD6EwPyP4iJOaMZbDXTXU+q14NbDfIRswqSR7jCv9jX7ZYo37APYoyGwItFB9c9YmT9D2nt1KHfBAPy8Lc82KlrTXa7AFe4WlTfOiTIpbg7QoLbS7suPtnzr2lqpGGS6Sj95eRTbBag0vvUdQTv7FEQDWHOKhkbuOvffkOBH4ockuI+JLghC77hQFRZc5fyXitxzB/DbXU2zRn+2KCCPqXlDISUBofVmyKNn3cg6DloGOJ7mvjuF9r2U3aSiUjVn7I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TYZPR06MB6263.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(366016)(1800799024)(376014)(38350700014)(81742002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TIIyEGxn/5+ADlJFw43xIRXwXymLk9hFeK0vCvOGwztf9LJbRo8LHWA0ru0yRCg6Xq1zPs2tJlVvYFu11hAgsYtlaIF5c/w5V6TdpsZTOZwsp1PBmOGOthBZOU4lbu7d/i/lwpP7lmM/iBeMbhuz+mzMH/kDI/+j5qXPIZ2ujlsU1kpSdtVWRAJ06jtQ1P9C9XpfpDXJdbhRW322VvDfqFfS/Nu7FtrtEw3WtWvIXLBia9HfmkMuS3TIflmbIuN4FuBqndFKmt/ahxl4Pdo7O51NvXmmjMXCaZ+FfQhwaCM1Gkpl9KzxYGqy1LG05jncXR1YiL6CovTZS2ASbczxwXd6oFUz3TgllzIUkHr9yotBIBMi9WBTqlG6G8Mh9fpRFuxOTZs12I2uBRKJSyo26qriawgPvQaJg5Ids5rbLlesxckZ4WE1yJ9s+gWes+hyapevAiM5OV/JrhTp85OhmSXlXRhgdcIXgJBUNArEpDU366tK9U6HdC7rvfs3SPFqXeOzTdY8dJpWWC8KQFGbXvx8JJWf/Unw6bS4/OKqaKEe7Dwbdy9ywOE2LXfpwS7x/b48B+YhuXyUxtDa9+2SngUTyugjHtM9EXywcFHDtXMI9slDRv+8kGQ5d6rOAM+0NRcMPzFTezPYjl3BAWWOwW3VjboWS1WvU6p0RmSdfcFlIcNKRlfs/AYyGNYMgglvF09No9UwMNTAolgux+Xge4n8Ul0Zzh0ooJYOfsMKPuvCx/nAOCBf8GJ9pYmo+OZ92ae8eLjiNB/oKMvmrxHCK8ZrAJHjp/od8c00ilaFJHMHQFrunoIzoyfEfBP+uijujtznI5sy+ax9QMYOAOX578DCK//bpABhS8dv8BCg32F/Lk79sV7GDzdNAcCNjH2DO/3lKSaIGBLBkoMPNMQawF/TwmHZhBKDLsEBV5UzVrp/UmMPVfQBZgb/LN+p2bNYfxjVROZnkS7BI+odzVVaVb5ECfyuE34uk4RfuBdITzX1ZUvBM0w+NGiO+IVqfqyFvjljROPPJN8rmzbtA/RWEHF8CWDVMjcJuhsHg6WSopi/sFaIKgmklcutb96VIlq9wMFa2jYvBFNiaj2tDjLuw827tzCd+JLMV6CW0POieHmUNJxsMOkwwzN3hZgnM9eKnaYLJEx+XZsK941XIcxaWFNrah2kHtswlo9HZdYkLVKrcF8KIE6Nh5u7DKrc26th/0r6fvyaYJe/NPw9bkTWafBr+RJOfLzIloMzMHilQWlqwO956+MImAyHxzezVGWIe2lXXBhlMJCduCZgtVeo5iKf80QOYCVicAmvnFU5JWK8dMRPwYv4XKX9Qj3+so0Kw53LBb3llNCNRMWaUTvwZNmXDe7FBvbxMlVZc6uSWJBeAWN+cKskvIvoIE/Cx8YZdonpMqT8seOhYoBunIu/H+ZYRq1XDLN6iXYvTh6d4BVKx8Dt8G1evzfBZ1SUCHfb/MlU+RKU/qyTdZIyxPaiGZAABg1t7+IxhhLEejUkhtgUQJgZ19gqNYeVJErp8BMtAL5CNPrpCJvXtZoj4j0NDv1k/mle0mW3R+YkYVl7jOb5ihEw2dqQd9yXA+/MAXzG X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a89fa828-05c8-48fd-2b99-08dcc75c7a94 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6263.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 12:25:18.8949 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /ygZZ3k2A6bbahkWEqtbXH5bZKSIWYNFQmQwof3KINJCd4e7cjCL91Hn1LtgDgwcl5z3AlwyQkBfvexQCymq2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5625 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_052531_471670_01AE2FFE X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org use dev_err_probe() instead of dev_err() to simplify the error path and standardize the format of the error code. Signed-off-by: Yang Ruibin <11162571@vivo.com> --- drivers/rtc/rtc-asm9260.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c index a83b47e0d..2b7058ebb 100644 --- a/drivers/rtc/rtc-asm9260.c +++ b/drivers/rtc/rtc-asm9260.c @@ -268,10 +268,8 @@ static int asm9260_rtc_probe(struct platform_device *pdev) return PTR_ERR(priv->clk); ret = clk_prepare_enable(priv->clk); - if (ret) { - dev_err(dev, "Failed to enable clk!\n"); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to prepare clk!\n"); ccr = ioread32(priv->iobase + HW_CCR); /* if dev is not enabled, reset it */