From patchwork Wed Aug 14 10:35:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13763307 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 11B85C52D7B for ; Wed, 14 Aug 2024 10:39:50 +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=F1XB3SobLk7VZ//KTQh7GEC/+D2L+CRxij+/IGHYnPA=; b=KGypz4WnzflYl+Tfh7Ey2QvqDO 3F1v0ox8KJREPP54WF9L3pcpfuK3U6uzvdw9bxL+6IEsPD+WBpcrTjYODiV/0XKUkKNsNo4v9q5vT luO6R9ZqrKl+6Fx6Ta27bofeXX+novyWieQj1su6EqM+y8TvWooVNT7uB+FPYsjfRXGDypBi3Ydag dO5pDmxbdqas8l/EpDOKT3l5rEPM4GFpLBI/Ba8CeE5XAER3grG+AEjrWNQfXbfO8YSZJhYY3sCeU 1KHCKPrw3vUkXNODg7DHg7cyIAudZu9Tn7t4bj6wgl6rHvoJf2+yqqdAk0Cx5YG1x1The71XBBEnU dIC4/3Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seBPm-00000006dw1-3Ucq; Wed, 14 Aug 2024 10:39:38 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seBMN-00000006cs8-07fP for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2024 10:36:08 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-428243f928cso44984215e9.3 for ; Wed, 14 Aug 2024 03:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723631765; x=1724236565; 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=F1XB3SobLk7VZ//KTQh7GEC/+D2L+CRxij+/IGHYnPA=; b=PElgpAXEF85BARA1jpHeX3pVdT5HpDerT+MmJabZUXZFd8uBoc5iaOmZ+ouVdkSTHP s2RHAz5aZt2XNEg/TayPmrWvxqVht4j+ZyBd2Vdpl0Hoyb47IHB1UQIHa+wQzKBxqFV8 m6A4kg+6DpHbneHXec8VC783vdPfb+rJpwtA503EumHtXGa7xnUq+35VvjAQJMkdRaOE qHIUP48golEvST4rcz7UPLlQDc8kWNfXF2/t/+5q4fCoMmsPXml5irldzbjp+x0xTIZH TZ/s24YaXqVHuf2cLuQTVR42JNOcROjTUCn/nTrg9b8W4VCJlEN+SDlo7ETU0N7zP2no Q3hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723631765; x=1724236565; 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=F1XB3SobLk7VZ//KTQh7GEC/+D2L+CRxij+/IGHYnPA=; b=tz32df/RoQSd7AzX5sJdYeoylR0ORQrJ4b6VROTd7pRYkFGdnDnuUUwWp5ER7QDXMB CtcGubDbKZyoKb3uHGHrDSvv3RjF35Uq8+y/Qh12e1ehaOYAqfGfdYvPvvJme/gn9q0w gc90/8n6lCbOWvt82LpckAT9tgfm9kQ4tIMCp+uyD00HfPfxE/5fSqKwHx/tf989txKF 2BuCL2lyUXl/j/6Z1Y/V4qIKzdb0hvbCQAWcKKK5DfLRSxZLWwI4Dq2jKpIHq6sYy4aD nfDHUR4JkIkKYmhAZLr0QfDB7K/vCcM8qf4q/1z7LzRpyAm3J3ONVPpK23+E5ifdODvH Exlg== X-Gm-Message-State: AOJu0YxTFwodRd3gzDDil6369bS/ZiDyzaReTGVYdm2NZ4hiaoMNf2DX 24jXVEKId+USyCZkuyvltiL5DbJA1UaCrfEKa445dzT/L5cOR4R3StSatfXViJI= X-Google-Smtp-Source: AGHT+IHu+Ec7SMXK44CW15aI6wvbF/SSdZgsQigQTDfjf8g51hhj14oMtIh5VGN/FNCI7LDZHb/OkA== X-Received: by 2002:a05:600c:310b:b0:426:8ee5:5d24 with SMTP id 5b1f17b1804b1-429dd23ce9dmr18887445e9.20.1723631765087; Wed, 14 Aug 2024 03:36:05 -0700 (PDT) Received: from [127.0.1.1] ([178.197.215.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded3dd4dsm15501835e9.29.2024.08.14.03.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 03:36:04 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 14 Aug 2024 12:35:41 +0200 Subject: [PATCH 05/11] usb: dwc3: imx8mp: simplify with dev_err_probe MIME-Version: 1.0 Message-Id: <20240814-b4-cleanup-h-of-node-put-usb-v1-5-95481b9682bc@linaro.org> References: <20240814-b4-cleanup-h-of-node-put-usb-v1-0-95481b9682bc@linaro.org> In-Reply-To: <20240814-b4-cleanup-h-of-node-put-usb-v1-0-95481b9682bc@linaro.org> To: Patrice Chotard , Thinh Nguyen , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michal Simek Cc: linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1324; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=VJma9HGhkE1TDrQ1OhGJk9qHK29VLxq1nCdewcEacTo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmvIiDZ4bAv7tVf6yyVs5Q8BDE0c30I/4lsc928 qm+fK7AL+6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZryIgwAKCRDBN2bmhouD 10D4D/oDgQvQBKScmFFH4ftXAiif3buhyX1tYwq/1dglDmk1dpS2Uom5hsUFuODAKTVkrgvS8I9 9ZBDxcK8lwLHgJsGEvv7wnENJ1ayzimyIU0FehRqrXwrvNKSkqVQUeJCECcCtIjs6mIbjSA49+n r+CKLXBd83EI5dLRl6jKhXrdyOSaZFAETUaHs2oZEf5vSG5js1KedY3wHxpRz/vbtkJaM5o1VK2 rP7MGvnPiaGhY6B7mEHEprCBBbNEPTqejUKyZUIwzg12xUfWw2x9RdMHURMyQrMJlrBiZIzlKGw bOW2gDzy2qWW9Q5/u/RBds4vyXhp47ojbXo11hHockv6+sHDUKg3wsMqQeDWC5uw8Vwo8VgPFZi N5BuVPl7VNp6CC0jCtVFpQqsumutnnByaPeMLryUa6ooemCfTAZ9OT/qIftpGHI3MCjKWsWgWP8 bKPy00IeGa7lFrjxYTtmDXmU27lo+tenGJyMdkO0NKuokFBi+4MgN9qo0cgmq8kQHNgGJAiTTXr A8qNtA04wUCvA7LBJYNyKQ1shog4fKrmVFGCZC8BdJNppG+sv0cNfDqAyq/idx6WHUL10VgRpRV +ax2dAU4fStY6PNV3LDjgL9lJjsoZC7ezHq+HxOJ+OHph0VyuqOSvKxXRxf3+Z+iyPpQRNCrm5W NR5sGcdIZ1Dozow== 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-20240814_033607_099931_A5E7F70A X-CRM114-Status: GOOD ( 12.23 ) 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 make the error paths a bit simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Frank Li Acked-by: Thinh Nguyen --- drivers/usb/dwc3/dwc3-imx8mp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 8c91e595d3b9..869b5e7c15ed 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -179,18 +179,14 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) } dwc3_imx->hsio_clk = devm_clk_get_enabled(dev, "hsio"); - if (IS_ERR(dwc3_imx->hsio_clk)) { - err = PTR_ERR(dwc3_imx->hsio_clk); - dev_err(dev, "Failed to get hsio clk, err=%d\n", err); - return err; - } + if (IS_ERR(dwc3_imx->hsio_clk)) + return dev_err_probe(dev, PTR_ERR(dwc3_imx->hsio_clk), + "Failed to get hsio clk\n"); dwc3_imx->suspend_clk = devm_clk_get_enabled(dev, "suspend"); - if (IS_ERR(dwc3_imx->suspend_clk)) { - err = PTR_ERR(dwc3_imx->suspend_clk); - dev_err(dev, "Failed to get suspend clk, err=%d\n", err); - return err; - } + if (IS_ERR(dwc3_imx->suspend_clk)) + return dev_err_probe(dev, PTR_ERR(dwc3_imx->suspend_clk), + "Failed to get suspend clk\n"); irq = platform_get_irq(pdev, 0); if (irq < 0)