From patchwork Fri Aug 23 10:16:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13774926 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 E2D55C52D7C for ; Fri, 23 Aug 2024 10:21:58 +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=6ocnpO172IW4JkslgO+O3WIS3ymQVVnJA1Ye00Cp2Ow=; b=y0e+gSJwsM1DYdAd0ioocneGOg wSbBW8YfL+1lIjxDa+HMDTIlu3wDeEb2si6JzEPI8/GVQ6NtwNBDSfXf2kL0eeu3Po3eDVhxXkL4k jCxbODF7r9awesiq7sy/24poDTX8tMLWZJZm6fBnDiBi3EHlAp/wjuBrAi89p60YOLtS9oLgTK+4L z8PBgSb7NY0OY61qcAG8gLM5m59OlDS26JiZXgbgWRegVOCQG8YoGjFHFtgjfjU6o7SHl73o6J6la uAPvas4AMxOeyFuEIt/DrN1dIIX52AqbXq/giaFGBgTA/HjJv6uH5ubkjYhY+9VVgEHM8yxoZ78Wa j/FFX3rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRQR-0000000GJfF-2aZp; Fri, 23 Aug 2024 10:21:47 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRL7-0000000GHrf-36cE for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 10:16:19 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a8629ddffbaso15917966b.1 for ; Fri, 23 Aug 2024 03:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724408175; x=1725012975; 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=6ocnpO172IW4JkslgO+O3WIS3ymQVVnJA1Ye00Cp2Ow=; b=jP8PwiVfS1goeZeA1w8Ws/FlpOrhifDF82Cs1FEwdlmHyq+7YK8L+9K5ibJGczqvga 5TxGYXCxJMZHda453cHm+xEojFoOcslTWnsFLtjVRW5/NCw7DQ2Py+Pl6Iyfki7ASN8N hmKw10nWDESkBSeSK/O9DM4lYhlKY4WtHA+wETJV6VWC7jhXt6pInWqA3GTvQvf49OAi pgHtDpOLUVuYBzCDx4a/LZfgkMyMFCKcOJ85O3xiNhy4PlaFmrFBNXvLsJVEv7+WlDvX C3reeHdWb3ysaDarKeIEPMCQmjyeYoe8xYevxCNrGzxrigQRGqN4X1VTt4+e5i05QvdL 3jEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724408175; x=1725012975; 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=6ocnpO172IW4JkslgO+O3WIS3ymQVVnJA1Ye00Cp2Ow=; b=Mqt13JqHGddfY4egut+UyKXMkVVAuzoNugvfOf2F5CGYtKLlVV82MRfn4t3F8no7I+ 6yY7poRUIpmv0ypinbDM5UW2OfhhMm00VPmQqmbK9T1N9+QTkvpTl5OpzgSaFwJnauOH 8PDrUNKXzCGRWPQal2Kxipk9d7SwDJyUuXmC7ZODHkpPV8ZVf+ALgYhhE2BBDXY4IuIE hWqHmmNFtDyRITnj0MhDEscl/X6/IztJkMi5o7pJujevChbSQjpAbtujfOSKZmx10CZf KRUXiXk5T5sZkQvhOv7O1XjtcxujY+b9HYLWM5eRJ7gbvrRcQkoYrbHD75xzEHPKQklN LR6Q== X-Forwarded-Encrypted: i=1; AJvYcCWf2+nLKM4fJQhQxEk6sRsvF0BuKp6MwhT4YXnQ0zona6m3uuXnNMjIJzQcQBUrK6pODz5o5MAylpvS4gzjm8Pf@lists.infradead.org X-Gm-Message-State: AOJu0Yy9xfDjciHs4N3wkY9amPRjblN96xbCdZOkan0EcWI0i+Rdc1ak BMYdhPVyR67SlYwGUb7fUukb1Z5LbSdYNGu8p5csouLFTTalLUh+CcWGuakoZyk= X-Google-Smtp-Source: AGHT+IGhkuSvyXebvL/B71M5+A63nJsMJdmc8ImauUTYMsBp/MtDZmt5w/H9Ro753NCVBIDUlhKVLQ== X-Received: by 2002:a17:907:7d91:b0:a86:7179:849e with SMTP id a640c23a62f3a-a86a4eb104dmr69259766b.0.1724408175415; Fri, 23 Aug 2024 03:16:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 03:16:14 -0700 (PDT) From: Krzysztof Kozlowski Date: Fri, 23 Aug 2024 12:16:01 +0200 Subject: [PATCH 6/7] memory: pl353-smc: simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240823-b4-cleanup-h-guard-v1-6-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=1309; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=Hq4cb2PCysHDymYKqh8l8D8U4p6NzM2SO2TX8TxhsYs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmyGFiWcy8eseMGER1brKDO7pSSLOJFVrVR1xx9 NnAdZE/YlSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZshhYgAKCRDBN2bmhouD 1wMAD/sGNlt5XqYNkHukE/5wRvv6uvT6Yob8h69eYgWUlllNP8Rr2rkissabZKtE5pxvqSJcDFK Jhs71OE9WYilg1k3JcV+fw5eayzmMK5WhS3bqL6hALGB1E9I2VPvxSulJQltKJSfhwNj8IdHX0n n1tUx4nz2wmT1Rq0j4kuS2AxiaytBfsSND1OAnGGnVEX4gwswxexllh+G0OWdwq/jKCTlNoj3HN eYmJSwq6cKnHRPQcdsffDw+6XvlCoJQLbBIS68phq+fxjUc8rgohmKMw8pjuXTFjzA5ayy0lR0W Y64DtnGHAYFHIXiaVFyUkFe6WzY4o1BXNuBRFUeIhSnLFXBVHYj0iqiIG48d8mQ9Cdvc9hVTio6 IBLXlzdodYtquWpmD4QI6pW9MSU+s4snGTIBcyfMg+uyPCSzYDW+yvyaLu3MpqJG0dvWRp2JcBY Qnli8Q4PhCMnSjf00zbqFc9Ej2S6plMQEjjrRpZmaP3WLPZ9pEXumSUkYZxS6SHICj13GffWMLc mO+SpPGLNf96jDf5UYkExVGrv2sBd7QvvXjpVZn/zxLjomdS1wiKJwtzSw2PmyBBW020JPeUHFG SjjV/B6zCmS6doppXqv4r0QI/zCChezl9j+0c4rOUnptlaCdoQf+J7qh0lE/R4oAMZzzjIzp52N pLa9e925jT+tHyg== 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_031617_843632_B45129B0 X-CRM114-Status: GOOD ( 11.18 ) 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: Miquel Raynal Reviewed-by: Jonathan Cameron --- drivers/memory/pl353-smc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/memory/pl353-smc.c b/drivers/memory/pl353-smc.c index 56e51737c81f..c75b99e49970 100644 --- a/drivers/memory/pl353-smc.c +++ b/drivers/memory/pl353-smc.c @@ -82,16 +82,14 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id) return -ENOMEM; pl353_smc->aclk = devm_clk_get(&adev->dev, "apb_pclk"); - if (IS_ERR(pl353_smc->aclk)) { - dev_err(&adev->dev, "aclk clock not found.\n"); - return PTR_ERR(pl353_smc->aclk); - } + if (IS_ERR(pl353_smc->aclk)) + return dev_err_probe(&adev->dev, PTR_ERR(pl353_smc->aclk), + "aclk clock not found.\n"); pl353_smc->memclk = devm_clk_get(&adev->dev, "memclk"); - if (IS_ERR(pl353_smc->memclk)) { - dev_err(&adev->dev, "memclk clock not found.\n"); - return PTR_ERR(pl353_smc->memclk); - } + if (IS_ERR(pl353_smc->memclk)) + return dev_err_probe(&adev->dev, PTR_ERR(pl353_smc->memclk), + "memclk clock not found.\n"); err = clk_prepare_enable(pl353_smc->aclk); if (err) {