diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 9e29943e56cae1d18d9dfcf3564baf4f839f087a..4eabfe28d2b39a89955ef820c3b069ba7d3b79e3 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -103,6 +103,7 @@ int driver_create_file(struct device_driver *drv, const struct driver_attribute *attr) { int error; + if (drv) error = sysfs_create_file(&drv->p->kobj, &attr->attr); else