patch-2.4.4 linux/drivers/net/tokenring/tmsisa.c
Next file: linux/drivers/net/tulip/21142.c
Previous file: linux/drivers/net/tokenring/tms380tr.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Fri Apr 20 11:54:22 2001
- Orig file:
v2.4.3/linux/drivers/net/tokenring/tmsisa.c
- Orig date:
Tue Mar 20 12:05:00 2001
diff -u --recursive --new-file v2.4.3/linux/drivers/net/tokenring/tmsisa.c linux/drivers/net/tokenring/tmsisa.c
@@ -19,7 +19,7 @@
* TODO:
* 1. Add support for Proteon TR ISA adapters (1392, 1392+)
*/
-static const char *version = "tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n";
+static const char version[] = "tmsisa.c: v1.00 14/01/2001 by Jochen Friedrich\n";
#include <linux/module.h>
#include <linux/kernel.h>
@@ -60,7 +60,7 @@
0
};
-static char *isa_cardname = "SK NET TR 4/16 ISA\0";
+static char isa_cardname[] = "SK NET TR 4/16 ISA\0";
int tms_isa_probe(struct net_device *dev);
static int tms_isa_open(struct net_device *dev);
@@ -93,7 +93,7 @@
struct tms_isa_card *next;
};
-static struct tms_isa_card *tms_isa_card_list = NULL;
+static struct tms_isa_card *tms_isa_card_list;
static int __init tms_isa_probe1(int ioaddr)
{
@@ -129,7 +129,7 @@
int __init tms_isa_probe(struct net_device *dev)
{
- static int versionprinted = 0;
+ static int versionprinted;
struct net_local *tp;
int j;
struct tms_isa_card *card;
@@ -271,6 +271,14 @@
{
/* Enlist in the card list */
card = kmalloc(sizeof(struct tms_isa_card), GFP_KERNEL);
+ if (!card) {
+ unregister_trdev(dev);
+ release_region(dev->base_addr, TMS_ISA_IO_EXTENT);
+ free_irq(dev->irq, dev);
+ free_dma(dev->dma);
+ tmsdev_term(dev);
+ return -1;
+ }
card->next = tms_isa_card_list;
tms_isa_card_list = card;
card->dev = dev;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)