From: Francois Romieu <romieu@cogenit.fr>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 9/10
Date: Sun, 30 Jun 2002 17:20:00 +0200 [thread overview]
Message-ID: <20020630172000.K19347@fafner.intra.cogenit.fr> (raw)
In-Reply-To: <3D17743E.8060905@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Mon, Jun 24, 2002 at 03:34:22PM -0400
- (cosmetic) gotoize error paths in TLan_Init.
--- linux-2.5.24/drivers/net/tlan.c Sun Jun 30 14:54:32 2002
+++ linux-2.5.24/drivers/net/tlan.c Sun Jun 30 15:10:34 2002
@@ -805,11 +805,10 @@ static int TLan_Init( struct net_device
if (!priv->is_eisa) /* EISA devices have already requested IO */
if (!request_region( dev->base_addr, 0x10, TLanSignature )) {
- printk(KERN_ERR "TLAN: %s: IO port region 0x%lx size 0x%x in use.\n",
- dev->name,
- dev->base_addr,
- 0x10 );
- return -EIO;
+ printk(KERN_ERR "%s: IO port region 0x%lx size 0x%x in use\n",
+ dev->name, dev->base_addr, 0x10);
+ err = -EIO;
+ goto err_out;
}
dma_size = TLAN_TOTAL_SIZE;
@@ -817,8 +816,8 @@ static int TLan_Init( struct net_device
if (!addr) {
printk(KERN_ERR "TLAN: Could not allocate lists and buffers for %s.\n",
dev->name );
- release_region( dev->base_addr, 0x10 );
- return -ENOMEM;
+ err = -ENOMEM;
+ goto err_out_release_region;
}
/*
* pci_alloc_consistent and an adequate power of 2 for TLAN_NUM_RX_LISTS
@@ -833,10 +832,8 @@ static int TLan_Init( struct net_device
if ( addr == NULL ) {
printk(KERN_ERR "%s: buffers allocation failed\n",
dev->name );
- pci_free_consistent(pdev, TLAN_TOTAL_SIZE, priv->rxList,
- priv->lists_dma);
- release_region( dev->base_addr, 0x10 );
- return -ENOMEM;
+ err = -ENOMEM;
+ goto err_out_free_consistent;
}
memset(addr, 0, dma_size );
priv->rxBuffer = (u8 *)addr;
@@ -874,6 +871,14 @@ static int TLan_Init( struct net_device
return 0;
+err_out_free_consistent:
+ pci_free_consistent(pdev, TLAN_TOTAL_SIZE, priv->rxList,
+ priv->lists_dma);
+err_out_release_region:
+ release_region( dev->base_addr, 0x10 );
+err_out:
+ return err;
+
} /* TLan_Init */
next prev parent reply other threads:[~2002-06-30 15:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-24 2:34 [PATCH] 2.5.24 : drivers/net/tlan.c Frank Davis
2002-06-24 6:43 ` Francois Romieu
2002-06-24 19:14 ` [PATCH] 2.5.24 : drivers/net/tlan.c; drivers/net/rrunner.c Francois Romieu
2002-06-24 19:34 ` Jeff Garzik
2002-06-24 20:59 ` Dave Jones
2002-06-30 15:18 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 0/10 Francois Romieu
2002-06-30 15:18 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 1/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 2/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 3/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 4/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 5/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 6/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 7/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 8/10 Francois Romieu
2002-06-30 15:20 ` Francois Romieu [this message]
2002-06-30 15:20 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 10/10 Francois Romieu
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=20020630172000.K19347@fafner.intra.cogenit.fr \
--to=romieu@cogenit.fr \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).