Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp561183ybl; Thu, 15 Aug 2019 23:57:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrO3zSq0OLNnJ2w1zyn4ZX0CWAxw3uRn22CWvbtAvuMBz7xpzhDYb+gmFTXYSHI81MnEgV X-Received: by 2002:a65:44cc:: with SMTP id g12mr6356695pgs.409.1565938672308; Thu, 15 Aug 2019 23:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565938672; cv=none; d=google.com; s=arc-20160816; b=adPnIBeZIqL5pnfTr+gNif+oklDQWcRLCBGA+oSrAezzSPAdCqwFo+1djuRP7smR7P 0ym3GB5GzK9vnd5ojcdf3tOmZ3EH+9aFhcSVvYz3/+NG1l7PVNZL2m4FcA8xNJBv7whV d8bc5V1SznR9rq0eLZqt9lRfk6SxjVBjHgPmXrxzBaasamdoZXdpNzKNHpWo903rowHZ riHPzSHkAcS5fjklls63RX/VjOqGE0TqgWPcL3nC+1x2jvUzsKBy1N47JEMP7O7HL9Vr cqOmgPRhMHMakfWXPVW7G1bb3/biKhoSRFqr+4fuLONN2/NTLc+ewRR8jcQ6loNtm8ba AccA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=4ztm7/zVpVkuXSHNsVBdpX0tZryq84sGebRCqDN6Oec=; b=SpM4DgxyOlqmbFyNgSNZ2Gbcm+aR37D6pPaAaBPGs3c3atHfxV8bB0zvuVAVb/BZ6Z 947tvmp4z3Pj0mR8mYmd7w2sm99rQ1JKrGJOuqzQGl0NQ/zsYWi9cJ1ju/TDGTFAJHY6 fxZT87vpEfto5pai/b217ZoP+v/l8khX4IkpeCaka0pjsbWh4f0oW8GIuaJy0n/iNijC mSAPvXo/2/MwkVpijLSX4YDDWpDmAEUjaNJBw0PIC+nF7cG5Snst5iitIiv5/gQR9mRd vL5EAbUaxpJ4FwJDnaxF4nwZbHQsoz5zijiFKdXr7yc9zVx+A/gw0jkF8Wt3CSxm/paa dKAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si2513070pjv.95.2019.08.15.23.57.37; Thu, 15 Aug 2019 23:57:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbfHPG4Z (ORCPT + 99 others); Fri, 16 Aug 2019 02:56:25 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:39649 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfHPG4Z (ORCPT ); Fri, 16 Aug 2019 02:56:25 -0400 Received: by mail-yb1-f194.google.com with SMTP id s142so1654571ybc.6; Thu, 15 Aug 2019 23:56:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4ztm7/zVpVkuXSHNsVBdpX0tZryq84sGebRCqDN6Oec=; b=hx6jhblNg9LydZ/U24XFVjMR70NOyb11+aLRqUxCEi03E6fDjEK+TV5PSm26Vq2rkG cozbT48eiJFf4/nyGKhi8Phd8Vi+nOC7yVyMfXPK6kiPZzAXrteoZslp7xOYF6K+PgGZ Lq60PTACwaRFhoU7phlh+bKLMKkT7cCrhYI6P62+Y2g6QK6xTzbfbSDoezs+TAifgHs6 T2nOAK/tiLPHtdh0Xm4g1rI8SxVxd/rbmjTMLAzATZ7iivmQTQGtQqXLUcVV8pzQwdsU lvxBrNDx3/EWV4f1TkEXjTxXfQqUdy5oFys/J8jyHZoQa+vCisLUkn852/SWCLXOiWlz 262w== X-Gm-Message-State: APjAAAWXAeuLs9NNUmbbYqsEd/GTG20fQKqgkjfIlg9R8eyMLI9tZh1z hsHVbqjHHHoBRZAxOUN+Asc= X-Received: by 2002:a25:7057:: with SMTP id l84mr6026642ybc.340.1565938584444; Thu, 15 Aug 2019 23:56:24 -0700 (PDT) Received: from localhost.localdomain (24-158-240-219.dhcp.smyr.ga.charter.com. [24.158.240.219]) by smtp.gmail.com with ESMTPSA id v203sm1099740ywa.99.2019.08.15.23.56.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Aug 2019 23:56:23 -0700 (PDT) From: Wenwen Wang To: Wenwen Wang Cc: Vinod Koul , Dan Williams , Enrico Weigelt , Allison Randal , Kate Stewart , Greg Kroah-Hartman , Thomas Gleixner , dmaengine@vger.kernel.org (open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() Date: Fri, 16 Aug 2019 01:56:08 -0500 Message-Id: <1565938570-7528-1-git-send-email-wenwen@cs.uga.edu> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If devm_request_irq() fails to disable all interrupts, no cleanup is performed before retuning the error. To fix this issue, invoke omap_dma_free() to do the cleanup. Signed-off-by: Wenwen Wang --- drivers/dma/ti/omap-dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c index ba2489d..5158b58 100644 --- a/drivers/dma/ti/omap-dma.c +++ b/drivers/dma/ti/omap-dma.c @@ -1540,8 +1540,10 @@ static int omap_dma_probe(struct platform_device *pdev) rc = devm_request_irq(&pdev->dev, irq, omap_dma_irq, IRQF_SHARED, "omap-dma-engine", od); - if (rc) + if (rc) { + omap_dma_free(od); return rc; + } } if (omap_dma_glbl_read(od, CAPS_0) & CAPS_0_SUPPORT_LL123) -- 2.7.4