From patchwork Wed Aug 14 10:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13763363 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 27626C3DA4A for ; Wed, 14 Aug 2024 11:30:51 +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:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VniZOaq6gdFHYm/HVi9M3gxl2wi+7Y1v4x6YyCs0zik=; b=U+5ZQ44e6hTWZ35w2e0KYCAicK X0VpqcYKLeqZlugotnp/DzgZwuiHJk9KL93Inbjw1mB0TAdO3rF8eC0mUvrgYAQiliHWCFoPGgwgs FzroP3uJQw+LYAon38CKH44onK93QPhMBvaO41fJB9VfPTvd897pWGvtLmqFvjM0rl3JvHpa7E4hV GuzVen8KXpatuAHMDjuQtT1303kV5x6aewPVSiIY/Svm5MsbzJTbmUGs70tIVhE6khfuIF5IGRrB2 GwH/1C7kWFaORjRn3+pOve3yNg9lJUEp8Ax/3hgGhxrYAqR4nVWipR5+5vemWhdYhAYSTA5JuDK93 +2rWN7aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seCDE-00000006lw2-0b9Q; Wed, 14 Aug 2024 11:30:44 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seB5i-00000006YTT-1imr for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2024 10:18:55 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-368440b073bso436101f8f.0 for ; Wed, 14 Aug 2024 03:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723630732; x=1724235532; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VniZOaq6gdFHYm/HVi9M3gxl2wi+7Y1v4x6YyCs0zik=; b=lXZ5R1sLrJvP0UGKLWZ0z0Hi4xIeY+7bBp+ad80HJOw4fKrOQopn4cY1pVW0O2EabS VKTXIcn0fv3fxzAsqw9jzI1vXvaRuqgW4p/GRMLQhJcq7LzW/IcNR37PaZgrWpOvGBzh o4menPFFYqtGvoVHV48SWz+BkJczbcLfvaV/pA88PSOxF/A9minsrwPRtpd7huqliVn2 SCzdbb/X4tiTB2k3zKkofVsZ80QXxX03k8zkPEbv/qDSIEsldTmSB1A4OsNYvDuZcBt0 tHY5W8q7snsolYhhI8PQkqlTAnbdFMiEc7BLy7sEHSuYA/TKmOZNr/hVPdVbdzExcIRJ iOqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723630732; x=1724235532; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VniZOaq6gdFHYm/HVi9M3gxl2wi+7Y1v4x6YyCs0zik=; b=JYPikxqGYuYIqtD1FlkKJOCNXButErSzg4RRAyZkDvKkOTCxETBnERr2WxXSqD9k0u TFe/2MpLxQFDd7OtzVgxwaeGpRB4fmxjtuz3vsTFjRoD0THyHUXXty35eMnV+KKGA+ds RCbIOl32MHdKQtXL2TEMZxyenD+IIFcdkEOSoozpMg6XnwylwAy5iwkN/JZYeV0TY5ef 3pHQndf/C3BrTPUXJmDfirKYjQFfKcKXVVbflEbhie0glXFjDIPU1EwC5j2gficsLsEp SMiUXMFYclPC7uaQkKqW8sXUpFMbGqpy5eUIUdkSke/M5DmVLkVBzKZkommLYTQX2jxn 8N9A== X-Forwarded-Encrypted: i=1; AJvYcCWpXCOGgVmHxAJ9jl5vZmKYu2irqKyG6VNu78mKMtaQcPe/oFew21dIHWdKwHyWDN8TjDe+V1FBINlcW0AX3kH6@lists.infradead.org X-Gm-Message-State: AOJu0YwXpqU72I2XAHFQGfkSzaKUOwirbnDE5WkSMpgV9mcJ7orvaoKu 66FqVNzf3TY9d6Ib9MhOP9q7VI6cgllt6odqoDCwW9O1NqAuKsU5MegyyCClOkM= X-Google-Smtp-Source: AGHT+IFtDsJPyLphAshdk30vTR0Sl8aU6sagYCDNH5sXB4NQUBZ21n39kniHa9yrRYMarUHR64R6JA== X-Received: by 2002:adf:fc86:0:b0:367:8418:fde4 with SMTP id ffacd0b85a97d-3717960863fmr1393954f8f.7.1723630732067; Wed, 14 Aug 2024 03:18:52 -0700 (PDT) Received: from krzk-bin.. ([178.197.215.209]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36e4e51ebcdsm12487737f8f.78.2024.08.14.03.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 03:18:51 -0700 (PDT) From: Krzysztof Kozlowski To: Thinh Nguyen , Greg Kroah-Hartman , Michal Simek , Grygorii Strashko , Vignesh R , Felipe Balbi , Radhey Shyam Pandey , Piyush Mehta , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski , stable@vger.kernel.org Subject: [PATCH 1/2] usb: dwc3: omap: add missing depopulate in probe error path Date: Wed, 14 Aug 2024 12:18:47 +0200 Message-ID: <20240814101848.67501-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240814_031854_469878_99BAFFB1 X-CRM114-Status: GOOD ( 12.08 ) 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 Depopulate device in probe error paths to fix leak of children resources. Fixes: ee249b455494 ("usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq") Cc: Signed-off-by: Krzysztof Kozlowski Acked-by: Thinh Nguyen --- drivers/usb/dwc3/dwc3-omap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index d5c77db4daa9..2a11fc0ee84f 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -522,11 +522,13 @@ static int dwc3_omap_probe(struct platform_device *pdev) if (ret) { dev_err(dev, "failed to request IRQ #%d --> %d\n", omap->irq, ret); - goto err1; + goto err2; } dwc3_omap_enable_irqs(omap); return 0; +err2: + of_platform_depopulate(dev); err1: pm_runtime_put_sync(dev); pm_runtime_disable(dev); From patchwork Wed Aug 14 10:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13763241 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 04327C3DA4A for ; Wed, 14 Aug 2024 10:20:23 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hlcn3l35uWBmsmhhZa4sbReBOtxyCW7iBKefFzSaEj0=; b=PQZgW7VwQFlfAV5ajkW1CFZ1Vc UnYDo30cG8K1asby7dAPnOVfsWfBZsGcRgyVT1jcnWwiyDgiFP/zL4+Gk2AZGc1GdYzKMF77QKLBy NqKng3x2+nYBOYeKKFVE6rcrwVOPv94CSavEOGqR3+b6tMO416NA6nEjRHZx0xylNUYdezonb5ndY j1avw6tF3k3YrU4nvvLS3CGDD5NtyC8oukeVxbBwcV1QDhYiFozBPLMVnOiBdzk+/k4Rv4IB4fgGd uGDKv/sQalQN0Uq7XAShWNjXV86GVFSZi0sabzUT2fMhGVs7XgJnetWRCn26kxGsICoqi5/xlDsb5 ImwhErAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seB6v-00000006YnN-2gmJ; Wed, 14 Aug 2024 10:20:09 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seB5j-00000006YTs-2Jbu for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2024 10:18:56 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42817f1eb1fso44966605e9.1 for ; Wed, 14 Aug 2024 03:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723630734; x=1724235534; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Hlcn3l35uWBmsmhhZa4sbReBOtxyCW7iBKefFzSaEj0=; b=anhIlttQlk/5ofDaarWMEKQ4ZhGbgyH/uUCiOH/A4zgFL7ETc6DSBVzxAzTAK2f6Mc vv9u0VGQ9KrYSomFa4M+kZ1hh3pC1UnooCYUNGaa4Kac15p5sZM1Sguz2EpmSD7ExEqU vOR/p3PHLVqsM7ir5b7Mmw0NhOd8ZZ1jO3lPODSLpomqwGPwVk4J6ap2JCWSL8r8s2pl Kt30gkTRX6Ecfx05HubcBn8OWMKO5Xy9/UWvGFmYqFBnxAvjqmC6coEwz0JMukDefyIi vyciooj53+ADniGdjbkg6nw2Cj3JYU3el/HcdInTd5dnA8dgvVq0/fXdZt/FVqllKh6V XC0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723630734; x=1724235534; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hlcn3l35uWBmsmhhZa4sbReBOtxyCW7iBKefFzSaEj0=; b=ESnS1BT6VCSd8yTRIKK9qtJ273iJSrUYgTI712oT/JidKXManwaHDeS/nVAET/mOIe sZa9JVZ6iMlF7wJ38xelv48sV6b3Q79RpWvcjBj3JESXGOB29TVXvpBHeQLMQvc4ecyz 34H2GVKZij904CMY3oAnZe2RfCLYB6tnA+ONv1o9bizqJ2Zcp1qdsArTsy2G+ajX6ik9 yYp8Bs+TgGbIOR6+TG/frnnxEoX5mbOcnbBz8HVmF8LC9E28w+35+2SZyNmq2vbMaUjX 3RXtwGmQXGwe5eXyZ9nxsEXUAtghnZET3OONi/h9m41TMmZgg16zbBtDDHJiyFFYW7P0 6OmA== X-Forwarded-Encrypted: i=1; AJvYcCU4fJJnsju52o98VL9jANyhyaevwtZXFYROXVQm7Qf0LqMTUrZE6yxdRPXgU2iuk57WXhtWLDZHLp893JxVzrEWYmFGUvm1lLvFruYCpbfC6fKmW88= X-Gm-Message-State: AOJu0YwvK71AmZ5cc3lQNilsb03drg8GPBgfuimY9UQgVA1SG8RE4QS0 8xaj5FYnlpN2miiiZ2my2s+QG2hjCNzLM3j+YwwjOody0qKkf9aIxmdZVWl7DrI= X-Google-Smtp-Source: AGHT+IGGCYxMm5pwJ0kqTr0pa1ANOyDh7JooCs78TDBUnUD1W1Z/CNBLZN1iX4ifTQinRs8vqf79gw== X-Received: by 2002:a05:600c:4754:b0:427:d72a:6c26 with SMTP id 5b1f17b1804b1-429dd22f463mr16562315e9.6.1723630733794; Wed, 14 Aug 2024 03:18:53 -0700 (PDT) Received: from krzk-bin.. ([178.197.215.209]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36e4e51ebcdsm12487737f8f.78.2024.08.14.03.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 03:18:53 -0700 (PDT) From: Krzysztof Kozlowski To: Thinh Nguyen , Greg Kroah-Hartman , Michal Simek , Grygorii Strashko , Vignesh R , Felipe Balbi , Radhey Shyam Pandey , Piyush Mehta , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski , stable@vger.kernel.org Subject: [PATCH 2/2] usb: dwc3: xilinx: add missing depopulate in probe error path Date: Wed, 14 Aug 2024 12:18:48 +0200 Message-ID: <20240814101848.67501-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240814101848.67501-1-krzysztof.kozlowski@linaro.org> References: <20240814101848.67501-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240814_031855_609441_AE66EBE2 X-CRM114-Status: GOOD ( 10.71 ) 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 Depopulate device in probe error paths to fix leak of children resources. Fixes: 53b5ff83d893 ("usb: dwc3: xilinx: improve error handling for PM APIs") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Radhey Shyam Pandey --- drivers/usb/dwc3/dwc3-xilinx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c index bb4d894c16e9..b7613a106da6 100644 --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -330,6 +330,7 @@ static int dwc3_xlnx_probe(struct platform_device *pdev) return pm_runtime_resume_and_get(dev); err_pm_set_suspended: + of_platform_depopulate(dev); pm_runtime_set_suspended(dev); err_clk_put: