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: 13763239 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D55D01AD9C0 for ; Wed, 14 Aug 2024 10:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723630735; cv=none; b=hZWDMIyez5xXGhExNH9WU/V4++Oz1jrXky5t6YW9qlaArfkONPXwG5aQhcLEHHKSJxjrrSDYUIa2u59nTvUegcPgAt6HQqHR92AOc9Nd4UH5s8Zb7nGi1MN4eF3xO8xmBFu0PBb1cjQ3M4LcJCH3ahY/8vJmSNAi6zVAv2RV49Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723630735; c=relaxed/simple; bh=VoIUTKlyGldU32MZSlDYD6KmvPIa8tx53ppKsKBdjS0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SOjqMRmIQxq54b68dkFQyjh+SEj7bMWVZ8Bn+v3S+J8F9+FsHxESo2mn4lyLqtJhu4hNu+Wovm9VWWJCA5zPg2ESrldgsxqmHE2FXCTXbsIHo9E6DLFNuPlhBj9SyuMsb4/ZymZ4WppYfrPZHmlswlLSrDJDX7xwfrgptxMZZD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RYPRlP3b; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RYPRlP3b" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-368313809a4so408300f8f.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=vger.kernel.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=RYPRlP3bIeCcooS0wEtOREffAgAk5yDUxoREPDTFFnL9XcB9yBsDAnX9Nb9k9oU1/6 CkVFNRB0F+kfs7/kSRp9BzjiqeMj+G4EkqtagAoBFr07WPOHdRq9HNUiN9q1JvmY7ogM cWV9l4ibd2n2SE/vF1KH28ia4MOzlL6O7Etyd3lK7pLJpQt6yZioDB+Lfur/6+mVtc2t mft3iNx48/fIX8FkMY/eO6cVP7Vbtc1UD/ELQdU0iiLSOKbWA59PFKacxfZTUq1i6xwt DPP3NWh1xzon3b0cS0FlVirT1TJ5X2m8fiLV+gtwNfdZl5PONhKacDDb1xtStCuV9+Wg E4Pg== 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=JjE8MlU/B0UkjpvLp139lUrW2AppHvesbYOWHBa59g9AEQs8Uf4Ix4V+kk+Y58WSs9 1vV3b7kFIFfNrIa9g6z1+erQiG7uGIGInmPlaN3pWIqculw+PDoougONwuhXqcC0dlm5 i7nNW4I+jnEFSAiCL+s9VeP3oXpQAq8n5fiuegaq6gv24K4hyGTwJCUUd0hzAm+fp2Dr hlH1kbSxIZasuulQtt+PH0MtIrggh5tqXif6vYrpituuS0YDbVNZ/DZ1Q/LZyLaeyzlm M4cMNP3yk3sZ2aV3uTLLfaIX2jAw0koNRdHTk+q27PAyQ6qcngrLUFv/niUKoiOgOteh 11oA== X-Forwarded-Encrypted: i=1; AJvYcCXehJfEHO85gltiEPSxGnJhrAOyc1RFnxVNhaTl94vG0cDfsNc/SvBIOIWZ827Mc5U3mVU/1D3zSVs=@vger.kernel.org X-Gm-Message-State: AOJu0YzdTXB6dv2CpFa9CL69XGewYkCC5PM4DvsI1njDNNkhkG/sOVS4 F6xmxbx1TfN8ylnt+Z0IyQSJZpu/wahSykem0fEq01rDKBEi0KcIi0zfta0HCCU= 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 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13763240 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69814144D15 for ; Wed, 14 Aug 2024 10:18:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723630737; cv=none; b=dLgS2/Zr9kJwSr7MmJlAgmYK+Ao5GUoRn1Ocq/V2FAoSCyTw4jZu1IV/ToxRUMgjwrVyE+dfNJTRp5v6qTxypMvxhAbUvllGiTsrDsuPfRXKI9Lx0Q10YOibSEdgfpmPPdcVCesm/RXJRcN1G6xu7IV08AgtDXhJTSjgooadw7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723630737; c=relaxed/simple; bh=gMMEesu7531ovk1t3pp1ZaBof5UtMxEfANDAyFyEQg8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ugOQhLYJCgNQ5GAnuVldJ7HX2U9QSOM4wBp2UBjBw/rLHopNV6TptpZ8sqDwYcCXucSiPB65eBWde8BWoCfWOg7kMi1QfYZ4bi2+UqCUevKIeAR9VPAwJVCivpcm75YH9ICatldS4UN4kH1PMX2epQ6Hngu1XmlZET6Rf8mWENo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=g/DJlaGJ; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="g/DJlaGJ" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-428119da952so45061415e9.0 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=vger.kernel.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=g/DJlaGJeOw6w6KsZTYz7fufly0SFZ0nRMEk11ZDaG2OfEDS1j0hvlEpdsuiE0AXeN WUX9XjUg4+qqJSxD5fIsxFRiN5YocOR7A8voEerrQcDECA0Z5mJesAw1pGrmxevd5EvB LUDQv651UgIhddOX+km1d4I9uoMB9f7E7KYOJfcgJYsFbAifjenrYmuOeD+l+NSWnl1Y YQzR2lOr9MouSiSKVnziyZ/WfYXOpsxY5E/X10vbJikOV1dcd1zu/mK/01iCvFdd9QwX fdYLn43A9UbS3cP+0KKbIdTF3OoLmenbfCYdBmR6Cw1bJA3ZCvhb2D1bUdtesiuK2v0Q UTjw== 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=YT09/20sqL0coHtdyzJ5ET36gMJPOtf/LFQ9vXVSNklDiruHCzZYnMI0CTTF3b52dL YcwdPhYcpDzuCq1JMO6A+tBFmy+UA/3ccptSK8tIgSIbe/N15zFejovhzTdg+1koAMh5 PBomFsiS4eYtI/XYxqSDTGdoHauE6eB6xkjfNBRcweIU5QnuM1sLtYAY8fV9lLwQGwvu sQxvLAzfe3HhGqPqQjzYxtuL1sQFKnlP3oCKI4PWY5Kh0UnPcn/6yWcWU6u/Nccu+Ucx igj5WC7zPdM+Y/5aL9BTZ0ezmB2ggMUfksqbAp8rXbOosLS8rjlUJh6VzQBFmR1dSttX DxPQ== X-Forwarded-Encrypted: i=1; AJvYcCWHrb+XTwo+pQ0VwFSJC6vyInpQX7EKNUTHocPMG1kgzYdRz+0CFspLzSTCiq24+tRwCyEb1hsgtBpLOz6IBfnmwqu+EvOIhlp7 X-Gm-Message-State: AOJu0YyHNoCPbGLFpdfL1FjTxvznPsMTLU2Kk2fA5vhBjw0iv6Ya3mfz xlUexyXkk4mTqjnOAuBu1/TYB/9JQJ62OXWsL3nUGrlNalqULjJ09/Q0R9LRUwg= 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> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: