usb: core: hub: don't print on ENOMEM
All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
36af2db870
commit
b74e706236
|
@ -1823,10 +1823,8 @@ descriptor_error:
|
||||||
dev_info(&intf->dev, "USB hub found\n");
|
dev_info(&intf->dev, "USB hub found\n");
|
||||||
|
|
||||||
hub = kzalloc(sizeof(*hub), GFP_KERNEL);
|
hub = kzalloc(sizeof(*hub), GFP_KERNEL);
|
||||||
if (!hub) {
|
if (!hub)
|
||||||
dev_dbg(&intf->dev, "couldn't kmalloc hub struct\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
kref_init(&hub->kref);
|
kref_init(&hub->kref);
|
||||||
hub->intfdev = &intf->dev;
|
hub->intfdev = &intf->dev;
|
||||||
|
@ -5337,11 +5335,10 @@ static int descriptors_changed(struct usb_device *udev,
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = kmalloc(len, GFP_NOIO);
|
buf = kmalloc(len, GFP_NOIO);
|
||||||
if (buf == NULL) {
|
if (!buf)
|
||||||
dev_err(&udev->dev, "no mem to re-read configs after reset\n");
|
|
||||||
/* assume the worst */
|
/* assume the worst */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
|
for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
|
||||||
old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
|
old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
|
||||||
length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
|
length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
|
||||||
|
|
Loading…
Reference in New Issue