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: