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);