X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fusb%2Fcore%2Fdevices.c;h=5541363b6d15dc0ce08502992829c20e23d6ca8e;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=30b4378aac3ee73fb87b571fbc3cb20655c2cb8a;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index 30b4378aa..5541363b6 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c @@ -589,6 +589,8 @@ static ssize_t usb_device_read(struct file *file, char __user *buf, size_t nbyte bus = list_entry(buslist, struct usb_bus, bus_list); /* recurse through all children of the root hub */ + if (!bus->root_hub) + continue; down(&bus->root_hub->serialize); ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0); up(&bus->root_hub->serialize);