From patchwork Fri Aug 16 10:54:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13765965 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 03121C531DC for ; Fri, 16 Aug 2024 11:02:59 +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=c/iamU9GEr5KdpKg86o77KhrKhRKzAxdW+GEgZ6rSGI=; b=nXfrSijY8C0vejiVUGDCDYONXD URT/BSuEL41B9LQalE/CgHseOw+r1kTlpwACLUoMQe6/curx+4QPVcVB9CP9Ofq6kC5DlmSCT5BFT BJcLI+0q+yqtTn4iG3FIanFMqwDBlnZAZy6TNhC4XSXC2y6h1e7YokClLdxjdEz6D9KviiwTEzuRV ZC4Aobwl3ECjtA40Ll8AKxZrvxXVt5fW+40fRI0/iQE1zXUSdWAOV/pK3RTrAfrJj5tXyzphUGN0E L+GBUJNrffIF++EGBXKo3O+CkLhMJRkV5NIxYUFyd3PfkG6n5K+YVUzBheCQbkjT3CVBxPrUmMqMD CIk/VUqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seujG-0000000CgMb-14OD; Fri, 16 Aug 2024 11:02:46 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seubn-0000000Ce5G-3a92 for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 10:55:05 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-429c4a4c6a8so13533785e9.0 for ; Fri, 16 Aug 2024 03:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723805702; x=1724410502; 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=c/iamU9GEr5KdpKg86o77KhrKhRKzAxdW+GEgZ6rSGI=; b=er8P+6Qxx2E4SFtblx97wG1wwvnS7L6MqMp3xNhz4dC8nONL4hJtOZor2iKiX7jHRF njeTPS3BRhk3q3jVTsan2JAtcCZya6hFTGAu4l2v1fOXJfjIavGCn/eoCdFl/F4eix64 KIojVUsJAZqZuT17HjX7dymblAHW3yCYWS56LhEQ5HLPic1OAWCbxoXOcEwerDqI0YVq MNW4tBPWPlOa0UrfEe09/MTR2etdFmf+hP1rAPVQOrAdIQOz8XOTNOZwpjHhCQ//w05m E7MOXu83gTgFC4kIYI7JDQakmVRtvPAhGj6u3AZK0MBhiVYZ3gVosSDvjtF6UGN08PZq CAIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723805702; x=1724410502; 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=c/iamU9GEr5KdpKg86o77KhrKhRKzAxdW+GEgZ6rSGI=; b=Qp9lJeK9eq0pLlILito1Ifw2JbJ+9NFRnYZPpNomLQtspyOhpy3fmhwUFD2oKgk7rc jJ45/Xvw9OdMuVuUSTPFWrmCC53lpSRQtWYjTGPkSMD61Szn32TwblNG77we3Fd+scR9 6PfvbV7AK9es6VfXmqd84t5YWSiaLbr5fily9uXEgYWQwo/suHgTBJuMC0xmRMZtE4Nv N0SOmnuy91CeYW9kzrRQcoF/Y9yvMVWAzUbC2l+o6kV+JZN/VHt5d1OEW9+mw7NQMWbI SOVqqjqiw2IBGdwYGDPYB0Be71AYmRfPWMS31nrl1KNCl9z0c2vR1EVhAEhSpE+RBkP7 goHg== X-Forwarded-Encrypted: i=1; AJvYcCXStTHmgf3ZPYGl0VK/fuwa8OQZ/WdH/cBzA9aqzcT/llKz4Db22asBPaWrEZcHEDjFao9LRXCDTIK4UD87gU6yU1yELXpPquPkmhIgbA3CA0h6TbQ= X-Gm-Message-State: AOJu0YwB7wOB7DooKq9vs3ygbbR14hMLuxSEMdL4/9FONyISMFqTy5Tp Kv8L5MVIxEIhxzL6bFbP324Dr2CluMNExdhMeLFY1dsgp/CSVoumDd9Yb3ME+ec= X-Google-Smtp-Source: AGHT+IFqPUcKioelayo+oH3fVDDKVUXmOzw5MuZiD+mM3WrmH/wV11bVb9kfp9ex06bAss09/vs1xA== X-Received: by 2002:a05:600c:4688:b0:426:6ed5:fd5 with SMTP id 5b1f17b1804b1-429ed7a5f5dmr16488295e9.6.1723805702352; Fri, 16 Aug 2024 03:55:02 -0700 (PDT) Received: from [127.0.1.1] ([178.197.215.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed7945cesm19461935e9.40.2024.08.16.03.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 03:55:01 -0700 (PDT) From: Krzysztof Kozlowski Date: Fri, 16 Aug 2024 12:54:35 +0200 Subject: [PATCH v2 11/13] memory: ti-aemif: simplify with dev_err_probe() MIME-Version: 1.0 Message-Id: <20240816-cleanup-h-of-node-put-memory-v2-11-9eed0ee16b78@linaro.org> References: <20240816-cleanup-h-of-node-put-memory-v2-0-9eed0ee16b78@linaro.org> In-Reply-To: <20240816-cleanup-h-of-node-put-memory-v2-0-9eed0ee16b78@linaro.org> To: Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lukasz Luba , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Thierry Reding , Jonathan Hunter , Santosh Shilimkar Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=927; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=VDRAiPcP3Nj5IaFsGnt2Bd0rnGw6XleemS6wXHO20gA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmvy/wrCSs8PTy9a+acv6ve1DhHDKLl614GOqhd SLF3vaqGJuJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZr8v8AAKCRDBN2bmhouD 19QTD/4ph7Rh9kOERlKeQFJlMtStsZ/eIUNcyB0K1URSMda/NtsfAfnuC/k29h6RvyDDcqr8xlU 4XTcEwCMwQ1nBxT7XwQosn1m7gZ0xyPyfstMv2PIQ4dlIutMxCGBsUUA9XUiKnVr5Z3C+ifWmVs hiCR6YfmrmHZfjvpidFRdVOhblMIxh7DEwIV8WTCeMQBlm79y3Ah4KYJtwZrjMnnC5Y3roYoOEp FKnlAjPZuA76rEN8IrNHYMKtm+G1yAKENn2PtnYN7Fl/JtRFPjhS5jz1QZ+svOcTVrUTb1oBBwh 8O8Rwtppmn+QM6HXf6B766Qs94/nbBi0B61hffqHUDWqAYbcQcw3uHydhMv2vIFyskftpsIjlCv iz5SDKPf5wpdk0t8K7FRVMAGAMtDCgeCi4ncPmwW+lnJp3AmiZp21UWGHROnv3cRo7bU3de+WGy lV8Kqsp2Yrl9qRYA0I21p4fKoMY8E47YKHjbZ6d4EL/7ADBxSrAWDosifQkJXVrSNWp5xhoMA7O uzrobE9b0fbPc1tPdhHj9rq9uog9sq6xmJOthMwvkmCNwWUrDCya6BUOkeQ8OAfA6Ax53z/WQG9 ADoxcmY3NwxxKo3ClqYQRpvaRA8CgXN4mBgz95fJty1IUKESCJ+a1idDrbVjqLVO3i8cgccxA2T bGuzLnFPy3XU9CQ== 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-20240816_035503_936437_CF8AE07A X-CRM114-Status: GOOD ( 12.17 ) 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 --- Changes in v2: 1. New patch --- drivers/memory/ti-aemif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c index e192db9e0e4b..360f2705b1ff 100644 --- a/drivers/memory/ti-aemif.c +++ b/drivers/memory/ti-aemif.c @@ -345,10 +345,8 @@ static int aemif_probe(struct platform_device *pdev) platform_set_drvdata(pdev, aemif); aemif->clk = devm_clk_get(dev, NULL); - if (IS_ERR(aemif->clk)) { - dev_err(dev, "cannot get clock 'aemif'\n"); - return PTR_ERR(aemif->clk); - } + if (IS_ERR(aemif->clk)) + return dev_err_probe(dev, PTR_ERR(aemif->clk), "cannot get clock 'aemif'\n"); ret = clk_prepare_enable(aemif->clk); if (ret)