| Submitter | Luis Henriques |
|---|---|
| Date | Feb. 28, 2013, 2:42 p.m. |
| Message ID | <1362062689-2567-26-git-send-email-luis.henriques@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/224003/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 2bcef65..287b7e2 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -293,7 +293,7 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start, struct device *dev; int error = 0; - if (!bus) + if (!bus || !bus->p) return -EINVAL; klist_iter_init_node(&bus->p->klist_devices, &i, @@ -327,7 +327,7 @@ struct device *bus_find_device(struct bus_type *bus, struct klist_iter i; struct device *dev; - if (!bus) + if (!bus || !bus->p) return NULL; klist_iter_init_node(&bus->p->klist_devices, &i,