diff options
-rw-r--r-- | drivers/base/driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 3ec3896c83a6..207c27ddf828 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -80,7 +80,7 @@ struct device *driver_find_device(struct device_driver *drv, | |||
80 | struct klist_iter i; | 80 | struct klist_iter i; |
81 | struct device *dev; | 81 | struct device *dev; |
82 | 82 | ||
83 | if (!drv) | 83 | if (!drv || !drv->p) |
84 | return NULL; | 84 | return NULL; |
85 | 85 | ||
86 | klist_iter_init_node(&drv->p->klist_devices, &i, | 86 | klist_iter_init_node(&drv->p->klist_devices, &i, |