patch-2.2.17 linux/drivers/net/comx-hw-locomx.c
Next file: linux/drivers/net/comx-hw-mixcom.c
Previous file: linux/drivers/net/comx-hw-comx.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Mon Sep 4 18:39:19 2000
- Orig file:
v2.2.16/drivers/net/comx-hw-locomx.c
- Orig date:
Mon Sep 4 18:37:28 2000
diff -u --recursive --new-file v2.2.16/drivers/net/comx-hw-locomx.c linux/drivers/net/comx-hw-locomx.c
@@ -7,6 +7,9 @@
* Based on skeleton code and old LoCOMX driver by Tivadar Szemethy <tiv@itc.hu>
* and the hostess_sv11 driver
*
+ * Contributors:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> (0.14)
+ *
* Copyright (C) 1999 ITConsult-Pro Co. <info@itc.hu>
*
* This program is free software; you can redistribute it and/or
@@ -27,9 +30,11 @@
* Version 0.13 (99/07/08):
* - Fix the transmitter status check
* - Handle the net device statistics better
+ * Version 0.14 (00/08/15):
+ * - resource release on failure at LOCOMX_init
*/
-#define VERSION "0.13"
+#define VERSION "0.14"
#include <linux/config.h>
#include <linux/module.h>
@@ -392,7 +397,7 @@
/* Register /proc files */
if ((new_file = create_proc_entry(FILENAME_IO, S_IFREG | 0644,
ch->procdir)) == NULL) {
- return -EIO;
+ goto cleanup_HW_privdata;
}
new_file->data = (void *)new_file;
new_file->read_proc = &locomx_read_proc;
@@ -402,7 +407,7 @@
if ((new_file = create_proc_entry(FILENAME_IRQ, S_IFREG | 0644,
ch->procdir)) == NULL) {
- return -EIO;
+ goto cleanup_filename_io;
}
new_file->data = (void *)new_file;
new_file->read_proc = &locomx_read_proc;
@@ -442,6 +447,11 @@
/* O.K. Count one more user on this module */
MOD_INC_USE_COUNT;
return 0;
+cleanup_filename_io:
+ remove_proc_entry(FILENAME_IO, ch->procdir);
+cleanup_HW_privdata:
+ kfree(ch->HW_privdata);
+ return -EIO;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)