From patchwork Fri Aug 30 07:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Yufan X-Patchwork-Id: 13784454 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 6E1EECA0EE9 for ; Fri, 30 Aug 2024 07:30:04 +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=qyYL06JpEE4EgEdruPC6xYYO1yJyMeMp1dUMmDwtVYg=; b=lAs1dOyHGGlAJzQ6Re9UVhOJg2 X+4eh19hrfIsmKMzejGBm25UqJkwpfFhpiDQbYwt252zzYDWp8bwuKPQZkJJfbbKZSA+VSOfbDDTY +Q1vSM6V4oGmZ5Xk1rft5E8OfB6+1+pL9i2n7Ju30MuSoNDsM3+/aypXvfZJEFd0NpUB2icfTGIYn douWL2GiGgne4W+ExbQdPmej4JcQZOwGsDGGpPM/sQ6SwKklpNYvDifrjnufi7+5BXVlGoVhUuF85 aVVaizzGzaWi5OpBwz1/ivDTqDQTEhixOHJiqACz+wg8JX8+7SIIhzT1k8L87z8kIvOu90WK9YZwp +8BOmQow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjw4u-000000057n4-0Vrj; Fri, 30 Aug 2024 07:29:52 +0000 Received: from mail-psaapc01on2061b.outbound.protection.outlook.com ([2a01:111:f400:feae::61b] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjw3x-0000000577d-3AAG for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 07:28:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y4iH+qW8E59n0f57lRj06IIwVT/9K1ijDwSVcGCJEY8M70Qj2xGG1DNexN62U/qHNCo906aa7Uzj12VI83U5qn1dEWfAzniKyih4GoRlDQDAD6p0jrh1HdR01zxx8iwjGFZ7BqBsmeXmzE8POsroJkrXQQubXRtM2DK1IgPqCnrIXYv+4viSpdCpVvI7FMbh132FI/5mICBLaU1XHjJyfBs6F5Dp4LFgmXVvwpTEKsmTCiW+kUKyzlkQtfuhvujMawV82dmW65JT/bZL822mhXO77q/D9PE/9AgG8Y4sH4ItkzUNdsL2mUuBAyTPdb7HEImUcI5W2knEIqnKTQwStg== 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=qyYL06JpEE4EgEdruPC6xYYO1yJyMeMp1dUMmDwtVYg=; b=PPi1vxbhDkGCu5WaWuwOfXOQpuw6TO7YC9dTd+XJ9I0Y/Rtr54/t95I74y0yJ5+PCVZODPDB9LTLbxFCXV3nCBcieCT4jlusO88+0FYj5/bH3IoKmRirgDeoobQqyB8mpYAwdpeHEzPJwivK9sQLiix6o0o7HEzmqh+KpOwU34iqkmz8X+Qt36vugZG5JgC4DQ2HWoSwcFu/KRGRU54bhC9oIv12tfjQQTJt5HeLv62cK18AeQO34PcoEzObCwHt+gHCUCqdERMAsYGYH4J7rwD7g2PElu5GhxTRQa6aLASZC4b0FYlDYXoQ/DqaRd7Yqmy2ZBL4/2ZSVd2kcWymRQ== 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=qyYL06JpEE4EgEdruPC6xYYO1yJyMeMp1dUMmDwtVYg=; b=g0d8rHEjFLb0kMq5BEQCa5tpFwUuE0feoHR/ZEnWdpGXycJGBBAwv9IcznC4MAkyMT8BUBjSgWV1o/pxD3t6tvDBea7871RVG2wu7r/HEWXMnFPjx6R9LkCZG3zVfdigF/Fpnh7zbvkVQY/ZcbjDceTuOqRIQ4jx0ank7fDg5fatBC7qvKSD+gnM+h4tFZV/Nx5tloCGMiJAlJuo6464UboTp7Qgi6x+9HYNDZRP9W3dzXV8U07H9U6Gba64aowIqpXqoRB6E1w4VKwKda1X1JKSY3YyD+KcDx6aE9ZyolJXTs0VYm7KEZcdQK/ZJAef7cEV2c55WB0kIv7DJrxj/Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from KL1PR0601MB5487.apcprd06.prod.outlook.com (2603:1096:820:bf::14) by KL1PR06MB6274.apcprd06.prod.outlook.com (2603:1096:820:e5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Fri, 30 Aug 2024 07:28:45 +0000 Received: from KL1PR0601MB5487.apcprd06.prod.outlook.com ([fe80::2129:59e5:6c67:311f]) by KL1PR0601MB5487.apcprd06.prod.outlook.com ([fe80::2129:59e5:6c67:311f%7]) with mapi id 15.20.7897.027; Fri, 30 Aug 2024 07:28:45 +0000 From: Chen Yufan To: =?utf-8?q?Emilio_L=C3=B3pez?= , Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Chen Yufan Subject: [PATCH v1] clk: sunxi: sun9i-mmc: Use dev_err_probe() to simplfy code Date: Fri, 30 Aug 2024 15:27:47 +0800 Message-Id: <20240830072747.11032-1-chenyufan@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: TYWPR01CA0047.jpnprd01.prod.outlook.com (2603:1096:400:17f::12) To KL1PR0601MB5487.apcprd06.prod.outlook.com (2603:1096:820:bf::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: KL1PR0601MB5487:EE_|KL1PR06MB6274:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e027bfc-979e-4683-6281-08dcc8c5612b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: xs60jA5ICs4KzULqqrHoxq0mnh2GFg0pBfYb8H+GXCtETee9StL/Dly9qqwYxecBtMINmaZxlXoKGd0st/77CE2i01x/Rxe6nydL+Ry8bHSr88tfOkHmX4QmdDRuSjX+rDa6xXoDAPJ/61Erce2PrP1YESnLMr3hJYCw2SwIzXMo92BWMfJBdgJVnf53BF1uzfLEE5ZFVDosSEg0jcPDRHv0TV0lueAi1kGqA+f9jqcIVNMhohu8XVJSlorIie8n/fZp4em9gOEKew3SSge/3gSIniDY20LzuanzDiMLQucdIoobnwHWjHM6Fp4YgotYU1XtmEYm3pJNdOMnNuzjYwLY8NsiO5CZql4Fb4wwDjE7EroTNfNCMaIIyAXCtY3a+N71ynpIeKty4XfQNKnxFmoLnIHbbe8QX5MvQP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1;SRV:;IPV:NLI;SFV:NSPM;H:KL1PR0601MB5487.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5rrGqoHN7DjAv6VbF/p/H7uRKXJjLlk7cAU0PZ568qlqYp0ALxPFWOam2RHFBneRGCYBj4hU1idc54STYLCvBJRECSiCm/COJrL6v0T6w3/nkB87/3Dr4oDhtdC+UwrYQp0o+d1oqjZeD+gC7F0c6/NMfrG2clEhn9bY2DmMebW+duw5pyj4OTDfwTuD9vqAsEUV3MKtxBaL33ZrtBwPPxgqFJMTuCtNiKgFn1tS9tvqONl/vP9KNkdoVeolVNz220zloOa8Qh25OPDn4z96WmCKwWusDBK7E2+ISQKsv7gXjHNk/h06dd320O1yCSfBhV0LSzOsgogApjxu/f7CPISDtnMNzFK4wxC9R2vLHv3exhJRm4ZUIyRz96Knl8YSu1fQ95SWxzPbIK28uopaPLNbwHG8pFm3l/v19OHwj+sfdIk+0+PHerhgVZHZbZPKbed71f78Q+kiW0K7w4OFoXgffhFjAtpDd642fZ6wkOoOgmObK2aahYxdbefiIuQ8Y180ej/du6jL1Ndudex6FkNXv8k9NDtpmiVqFVvfJTghu5j7Rb5fHbFSwW09YwYxFc9erkcr+2V+EoSpMpXW7MO4sYxLPynS9KDPJ7VD66deTBkxav/7phqCiylXQOu4U7POdUt9dC1MGkWpeLvFkHVJvkiiqhKYEmC3BK/PuLNm2OUKRY0HIYBNATiDyK97Z0MXvhUeNvcA6poPW0V+AljQFfNkMhFrYu/SyPhwHZgUaDoE2x/kraio5V1/Po9Aw0L/iDYmiLI82kCr6HPilGYFl7LjUPpFEu6WaqXqqppPsBaa6gOvn//fQetty47w4ExsnAtcqKc+anNAaiTPc5HEMd487sTkhpCCdcoB8TZQAqAqfO07NO0Bbj/vfq+gIIZ7/3S11J3owj3b8TN2+33YSuax3pELNkB/1eCdw9tqEgdrk9gWse82UDL7oYimyfuFGy5l2KGQb+g7IZxZT5NRwOb33gJnrngBwPxaSiT8orfJVvtbJHNEdgJDKOJEyM3znKPSzfhgXqf2hR9O5YvJCOgeeV5mXQ+5u87VbjhPsIv9tCW6vuZ6ONVqx/behHApoGD1BinKneo9Dblo1zuCIbCpNuFWT+lkHxH6koA1Xt6rpikkmV7FED0LUC2WYsMyQMsmO+Hv50W4Z9NXj/NHuA7QTpqr6+yZ8F8QiA+bOl/FLafPYMgpkSkV41fG1SdoSoWj1PmaS3BL8G9K8GVEBKAFDZw66FWWb1KfXKL0gANqYgGD42ox1Kyw3ONiW74v3XVLRMfERAdndJ2eOmox2AjgVVn0RXvBhj6YQ6zKQfrO7AmQ3jAxDuOcRwoitzvYWhZ2r0/HMlRsk3jec7kJd3ygLwRKS26yK3Q/BEJTPQZMmRiv6uFp/QjpM87I93c4m2nNK6MFK5ya2ccsVGf8Yzwn3S4V9IzX3Swm4GmNLbVcmNZ1cueStF1H8lNzlPOE4GRYXwUsfiu63rCL13xt/BUzTG61PvHgane9ItiDSGRHtR1KXPgMowChVp8mBX+EOEIt/f/z5FQzwOFitab5YiBVXwjyU7rSReQrIBZBpXLXKNlnc8Q8gTUC0PUN X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e027bfc-979e-4683-6281-08dcc8c5612b X-MS-Exchange-CrossTenant-AuthSource: KL1PR0601MB5487.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 07:28:45.0469 (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: Jy3/YggptzM6KTq6NoJ0t7zLQmKTUCCzycrPMiF4DJdzaZ9IJpjMh5+nZHN+HWWk8Q3lLa7qtU18IR+h9GMetA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6274 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_002853_821911_DABE6479 X-CRM114-Status: GOOD ( 10.70 ) 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() can make code a bit simpler. Signed-off-by: Chen Yufan --- drivers/clk/sunxi/clk-sun9i-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c index 91074017c04f..e6b62e421936 100644 --- a/drivers/clk/sunxi/clk-sun9i-mmc.c +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c @@ -134,10 +134,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) } ret = reset_control_deassert(data->reset); - if (ret) { - dev_err(&pdev->dev, "Reset deassert err %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "Reset deassert err %d\n"); clk_parent = __clk_get_name(data->clk); for (i = 0; i < count; i++) {