From: "Samuel Ortiz" <samuel@sortiz.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, irda-users@lists.sourceforge.net,
Wang Chen <wangchen@cn.fujitsu.com>
Subject: [PATCH 1/4] irda: via-ircc proper dma freeing
Date: Mon, 30 Jun 2008 21:23:52 +0200 [thread overview]
Message-ID: <20080630192753.854146476@sortiz.org> (raw)
In-Reply-To: 20080630192351.765611690@sortiz.org
[-- Attachment #1: dma_cleanup.patch --]
[-- Type: text/plain, Size: 1077 bytes --]
From: Wang Chen <wangchen@cn.fujitsu.com>
1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
---
drivers/net/irda/via-ircc.c | 3 +++
1 file changed, 3 insertions(+)
Index: net-next-2.6/drivers/net/irda/via-ircc.c
===================================================================
--- net-next-2.6.orig/drivers/net/irda/via-ircc.c 2008-06-14 13:20:23.000000000 +0200
+++ net-next-2.6/drivers/net/irda/via-ircc.c 2008-06-14 13:25:18.000000000 +0200
@@ -1546,6 +1546,7 @@ static int via_ircc_net_open(struct net_
IRDA_WARNING("%s, unable to allocate dma2=%d\n",
driver_name, self->io.dma2);
free_irq(self->io.irq, self);
+ free_dma(self->io.dma);
return -EAGAIN;
}
}
@@ -1606,6 +1607,8 @@ static int via_ircc_net_close(struct net
EnAllInt(iobase, OFF);
free_irq(self->io.irq, dev);
free_dma(self->io.dma);
+ if (self->io.dma2 != self->io.dma)
+ free_dma(self->io.dma2);
return 0;
}
--
next prev parent reply other threads:[~2008-06-30 19:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 19:23 [PATCH 0/4] irda: IrDA updates for 2.6.26 Samuel Ortiz
2008-06-30 19:23 ` Samuel Ortiz [this message]
2008-06-30 19:23 ` [PATCH 2/4] irda: Remove useless pm_dev references Samuel Ortiz
2008-06-30 19:23 ` [PATCH 3/4] irda: New device ID for nsc-ircc Samuel Ortiz
2008-06-30 19:23 ` [PATCH 4/4] irda: Fix netlink error path return value Samuel Ortiz
[not found] ` <20080630192351.765611690-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2008-06-30 19:59 ` [PATCH 0/4] irda: IrDA updates for 2.6.26 David Miller
2008-07-07 11:08 ` Samuel Ortiz
[not found] ` <20080707110839.GA2949-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2008-07-07 11:10 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080630192753.854146476@sortiz.org \
--to=samuel@sortiz.org \
--cc=davem@davemloft.net \
--cc=irda-users@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=wangchen@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.