git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
pnp
/
pnpbios
/
proc.c
diff --git
a/drivers/pnp/pnpbios/proc.c
b/drivers/pnp/pnpbios/proc.c
index
88fcd16
..
8027073
100644
(file)
--- a/
drivers/pnp/pnpbios/proc.c
+++ b/
drivers/pnp/pnpbios/proc.c
@@
-2,7
+2,7
@@
* /proc/bus/pnp interface for Plug and Play devices
*
* Written by David Hinds, dahinds@users.sourceforge.net
* /proc/bus/pnp interface for Plug and Play devices
*
* Written by David Hinds, dahinds@users.sourceforge.net
- * Modified by Thomas Hood
, jdthood@mail.com
+ * Modified by Thomas Hood
*
* The .../devices and .../<node> and .../boot/<node> files are
* utilized by the lspnp and setpnp utilities, supplied with the
*
* The .../devices and .../<node> and .../boot/<node> files are
* utilized by the lspnp and setpnp utilities, supplied with the
@@
-87,11
+87,13
@@
static int proc_read_escd(char *buf, char **start, off_t pos,
return -EFBIG;
}
return -EFBIG;
}
- tmpbuf =
pnpbios_km
alloc(escd.escd_size, GFP_KERNEL);
+ tmpbuf =
kz
alloc(escd.escd_size, GFP_KERNEL);
if (!tmpbuf) return -ENOMEM;
if (!tmpbuf) return -ENOMEM;
- if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base))
+ if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) {
+ kfree(tmpbuf);
return -EIO;
return -EIO;
+ }
escd_size = (unsigned char)(tmpbuf[0]) + (unsigned char)(tmpbuf[1])*256;
escd_size = (unsigned char)(tmpbuf[0]) + (unsigned char)(tmpbuf[1])*256;
@@
-131,7
+133,7
@@
static int proc_read_devices(char *buf, char **start, off_t pos,
if (pos >= 0xff)
return 0;
if (pos >= 0xff)
return 0;
- node =
pnpbios_km
alloc(node_info.max_node_size, GFP_KERNEL);
+ node =
kz
alloc(node_info.max_node_size, GFP_KERNEL);
if (!node) return -ENOMEM;
for (nodenum=pos; nodenum<0xff; ) {
if (!node) return -ENOMEM;
for (nodenum=pos; nodenum<0xff; ) {
@@
-166,10
+168,12
@@
static int proc_read_node(char *buf, char **start, off_t pos,
u8 nodenum = (long)data;
int len;
u8 nodenum = (long)data;
int len;
- node =
pnpbios_km
alloc(node_info.max_node_size, GFP_KERNEL);
+ node =
kz
alloc(node_info.max_node_size, GFP_KERNEL);
if (!node) return -ENOMEM;
if (!node) return -ENOMEM;
- if (pnp_bios_get_dev_node(&nodenum, boot, node))
+ if (pnp_bios_get_dev_node(&nodenum, boot, node)) {
+ kfree(node);
return -EIO;
return -EIO;
+ }
len = node->size - sizeof(struct pnp_bios_node);
memcpy(buf, node->data, len);
kfree(node);
len = node->size - sizeof(struct pnp_bios_node);
memcpy(buf, node->data, len);
kfree(node);
@@
-184,7
+188,7
@@
static int proc_write_node(struct file *file, const char __user *buf,
u8 nodenum = (long)data;
int ret = count;
u8 nodenum = (long)data;
int ret = count;
- node =
pnpbios_km
alloc(node_info.max_node_size, GFP_KERNEL);
+ node =
kz
alloc(node_info.max_node_size, GFP_KERNEL);
if (!node)
return -ENOMEM;
if (pnp_bios_get_dev_node(&nodenum, boot, node)) {
if (!node)
return -ENOMEM;
if (pnp_bios_get_dev_node(&nodenum, boot, node)) {