From patchwork Fri Aug 23 10:15:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13774924 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 91D2AC52D7C for ; Fri, 23 Aug 2024 10:20:26 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=N7t5hccTkDQZVo5vU52s+pXfo+StB90U/RzqpPMyIi8=; b=WjTBCRuDKbRLECAY3OY+vHXI5v FHAVdinn634qr/1Qx49HBWOFAOFSYxMlQvi4uGjoGlzGohJ7MKpdeAejKxXOzR5hj+kHlqXVym4Xj vmRrP/XYy9XbBRDmg2IjSfCaVOpdMjsacwqz9JEEJwvpBpdenB+rID4DsKBkrbvlTA4EAtNzq6kej Uy07of8tCwPXqDhZ1F4rTQYXLp+tvx3AucUBx5MjfIdZit+Kz/+BjxfWnSYHquyxh0qopYtVp6Nka a9MM56cAL2zciBEQeD5MVNayKPzMJUuz7lQBM+RbBbQ05o5EEn2L7nYCF+Bkb3RcX0Xo+5vm4xnhc DBGUhCZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shROw-0000000GJBU-0AkD; Fri, 23 Aug 2024 10:20:14 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRL4-0000000GHq9-1sQg for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 10:16:16 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a86753ac89bso10311466b.0 for ; Fri, 23 Aug 2024 03:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724408172; x=1725012972; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=N7t5hccTkDQZVo5vU52s+pXfo+StB90U/RzqpPMyIi8=; b=SjyHCTdjqiW3/PQWSxEpBkKX+MmbyWGfdZxDm7w6u/P3SyJVs26PcKvaawfXTXd7ep J+JDvZeMbdOkVp3HLQWZ0Y9v4tm9sgkki+3NP3fqKlLo2PvNl1A/1A8/9D971UfehKve sLfZkjIRmlQvrweii7s8IpgxO2/12XqZhaibdURi0U3xVXEVpc3LtDdqSEJM8gqir3oE efMkWr/97hkpXcakBOZpv9jLkA+naCKO9lVI9dhVob4bwkhBAY6m66Gu/5yXbdJJS8Co s928h2hbE0tIAzeD+m+5MXvR9aetLLF1CCbz+1uEfQhpcSZbHAXTVOrpjJIKshc0eDQe sC2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724408172; x=1725012972; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N7t5hccTkDQZVo5vU52s+pXfo+StB90U/RzqpPMyIi8=; b=URrI4zEN8Md+eNR93RRwA3kc9o0OMSGsg6hXInxONq799uOaWH1cu+vDjg9vG0mHSp UGZj2PWy+pEGJm+GdQGo16VTqoh/P+aKAy7YCb44HWjLdp5SGYngOsVeaMLuMQae/aiG VIyrBg/M0OQlmC/hxndkbDlwVIYbuBcReB1gqWr7YPWtr4CBsnLdbeZ7oJRJHFwUTC7E TzfRNiRVY4MsTE3W+OBOj7+wava2kJB033lblrMbw89cUTiHlnRV+w8lkfwrKOnlTTb3 tsnhaBPBu1jSCSzTbCdrVBcEuxkIU+U1IB4WoVgOC0I660hq07yBMKZc4s2cxY2bvSCe X/Bg== X-Forwarded-Encrypted: i=1; AJvYcCUo1Q+VSsuEWTnzB8WE2SxKXIHYTlg2QHhPBtWwdTxJ25QctjCZI4QTglyOqdM0rMn9xXdTajfAlkqmwZxRJ0qd@lists.infradead.org X-Gm-Message-State: AOJu0YxUH+3JGjbaWbqAGkwcgTRktNkWXP8/gmdlA1AfcDY7wijSPmfh ELpE+0MOigQZWpjoQLRZl3SzN7Qqk9IJrcOJlPR5yGPro8bInv3v4Ph33QgSV7I= X-Google-Smtp-Source: AGHT+IFlkL5s7rmHHgYZMRB1BLvikyDv99I8y83akU4jvf5DqV38Aa2gkHT1IB1hClppKtMqNTmTRA== X-Received: by 2002:a17:907:2d07:b0:a7a:ab8a:38b with SMTP id a640c23a62f3a-a86a54b66aemr78280566b.7.1724408172034; Fri, 23 Aug 2024 03:16:12 -0700 (PDT) Received: from [127.0.1.1] ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f2a1df5sm237912166b.68.2024.08.23.03.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 03:16:11 -0700 (PDT) From: Krzysztof Kozlowski Date: Fri, 23 Aug 2024 12:15:59 +0200 Subject: [PATCH 4/7] memory: pl172: simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240823-b4-cleanup-h-guard-v1-4-01668915bd55@linaro.org> References: <20240823-b4-cleanup-h-guard-v1-0-01668915bd55@linaro.org> In-Reply-To: <20240823-b4-cleanup-h-guard-v1-0-01668915bd55@linaro.org> To: Santosh Shilimkar , Krzysztof Kozlowski , Roger Quadros , Tony Lindgren , Vladimir Zapolskiy , Miquel Raynal , Michal Simek Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=898; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=IlZEpsC5zLoI1hcyp/Rq4r/SZxK68xgrN7mWoEs36F4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmyGFh/t4Skn3nDrz6/5TT4P0rYPwiS3a/epBSf tzcKzaA2ZGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZshhYQAKCRDBN2bmhouD 1+xjD/4ruvUAwsgXVGQc0suOEQkGhBJDCb2yPwHptmIN2/Cz6v83MTq62MWytE7rdN2phWy9O3f 56yiu1nANYWS2NWDWO0kosm/uUjEqkMGqtyWK/pnQejkUhHMa4rQ/myL9xx+HZW2K3Bh2SBDgZ4 6ZLwIlHfAB+fzB0X83HHUe2/aotZPqNrnysD9mIh1EM+nHlTPLNoJoNKc/uo29G6m8kTrPLKxb3 4ToplKvocyNwTPLYUwT02C0KUtbB4+d67+xx4nnPm2ubzPHbPKnZnS+jbuwKER2b9fIS8ZbeUoj WX+UYhccc7ySZNT482TECCo2+TluRj3/4f5ICmM5nxGQURDdJzq1x9lD198O2PaLdE/FiARsnAr wNC7qaAzZAhAoVmnNPRgCwEjVKu5yIgB5OzGNR7vlx9DNUoF/IlGWo5jMIGFFj3yUaxhIogBX0J A3nJPQTAKEtc+2u15w3TROpLzcw3tVqexUTmSFeR91i0uFz0P2KJUpNFRWWBAkCp3AxGjbK/zXd 4FmSICD+VMNMNlwqhQzeBvd03X74EDItoXYvmul61L5I7l0xuE+toFTcEqCRosdTG3A252FL2h2 ZY84cfqj/xdyvUssSD/4su/wROzfVx5QHgVWPUclmNz+/5zVaNC0wF3+DUE0HOQsmv0NQf0lX5/ 7CE8apeWgpQcD2Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_031614_528027_A72C2D9A X-CRM114-Status: GOOD ( 11.13 ) 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() to avoid dmesg flood on actual defer. This makes the code also simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jonathan Cameron Reviewed-by: Vladimir Zapolskiy --- drivers/memory/pl172.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/memory/pl172.c b/drivers/memory/pl172.c index 9eb8cc7de494..390012401f64 100644 --- a/drivers/memory/pl172.c +++ b/drivers/memory/pl172.c @@ -217,10 +217,9 @@ static int pl172_probe(struct amba_device *adev, const struct amba_id *id) return -ENOMEM; pl172->clk = devm_clk_get(dev, "mpmcclk"); - if (IS_ERR(pl172->clk)) { - dev_err(dev, "no mpmcclk provided clock\n"); - return PTR_ERR(pl172->clk); - } + if (IS_ERR(pl172->clk)) + return dev_err_probe(dev, PTR_ERR(pl172->clk), + "no mpmcclk provided clock\n"); ret = clk_prepare_enable(pl172->clk); if (ret) {