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 kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
usb
/
core
/
config.c
diff --git
a/drivers/usb/core/config.c
b/drivers/usb/core/config.c
index
99595e0
..
a9d89c7
100644
(file)
--- a/
drivers/usb/core/config.c
+++ b/
drivers/usb/core/config.c
@@
-1,9
+1,4
@@
#include <linux/config.h>
#include <linux/config.h>
-
-#ifdef CONFIG_USB_DEBUG
-#define DEBUG
-#endif
-
#include <linux/usb.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/module.h>
#include <linux/init.h>
@@
-112,8
+107,12
@@
void usb_release_interface_cache(struct kref *ref)
struct usb_interface_cache *intfc = ref_to_usb_interface_cache(ref);
int j;
struct usb_interface_cache *intfc = ref_to_usb_interface_cache(ref);
int j;
- for (j = 0; j < intfc->num_altsetting; j++)
- kfree(intfc->altsetting[j].endpoint);
+ for (j = 0; j < intfc->num_altsetting; j++) {
+ struct usb_host_interface *alt = &intfc->altsetting[j];
+
+ kfree(alt->endpoint);
+ kfree(alt->string);
+ }
kfree(intfc);
}
kfree(intfc);
}
@@
-188,10
+187,9
@@
static int usb_parse_interface(struct device *ddev, int cfgno,
}
len = sizeof(struct usb_host_endpoint) * num_ep;
}
len = sizeof(struct usb_host_endpoint) * num_ep;
- alt->endpoint = k
m
alloc(len, GFP_KERNEL);
+ alt->endpoint = k
z
alloc(len, GFP_KERNEL);
if (!alt->endpoint)
return -ENOMEM;
if (!alt->endpoint)
return -ENOMEM;
- memset(alt->endpoint, 0, len);
/* Parse all the endpoint descriptors */
n = 0;
/* Parse all the endpoint descriptors */
n = 0;
@@
-353,10
+351,9
@@
static int usb_parse_configuration(struct device *ddev, int cfgidx,
}
len = sizeof(*intfc) + sizeof(struct usb_host_interface) * j;
}
len = sizeof(*intfc) + sizeof(struct usb_host_interface) * j;
- config->intf_cache[i] = intfc = k
m
alloc(len, GFP_KERNEL);
+ config->intf_cache[i] = intfc = k
z
alloc(len, GFP_KERNEL);
if (!intfc)
return -ENOMEM;
if (!intfc)
return -ENOMEM;
- memset(intfc, 0, len);
kref_init(&intfc->ref);
}
kref_init(&intfc->ref);
}
@@
-422,8
+419,6
@@
void usb_destroy_configuration(struct usb_device *dev)
struct usb_host_config *cf = &dev->config[c];
kfree(cf->string);
struct usb_host_config *cf = &dev->config[c];
kfree(cf->string);
- cf->string = NULL;
-
for (i = 0; i < cf->desc.bNumInterfaces; i++) {
if (cf->intf_cache[i])
kref_put(&cf->intf_cache[i]->ref,
for (i = 0; i < cf->desc.bNumInterfaces; i++) {
if (cf->intf_cache[i])
kref_put(&cf->intf_cache[i]->ref,
@@
-459,16
+454,14
@@
int usb_get_configuration(struct usb_device *dev)
}
length = ncfg * sizeof(struct usb_host_config);
}
length = ncfg * sizeof(struct usb_host_config);
- dev->config = k
m
alloc(length, GFP_KERNEL);
+ dev->config = k
z
alloc(length, GFP_KERNEL);
if (!dev->config)
goto err2;
if (!dev->config)
goto err2;
- memset(dev->config, 0, length);
length = ncfg * sizeof(char *);
length = ncfg * sizeof(char *);
- dev->rawdescriptors = k
m
alloc(length, GFP_KERNEL);
+ dev->rawdescriptors = k
z
alloc(length, GFP_KERNEL);
if (!dev->rawdescriptors)
goto err2;
if (!dev->rawdescriptors)
goto err2;
- memset(dev->rawdescriptors, 0, length);
buffer = kmalloc(USB_DT_CONFIG_SIZE, GFP_KERNEL);
if (!buffer)
buffer = kmalloc(USB_DT_CONFIG_SIZE, GFP_KERNEL);
if (!buffer)