|
|
@@ -614,8 +614,10 @@ static void remove_probe_files(struct bus_type *bus)
|
|
|
static ssize_t uevent_store(struct device_driver *drv, const char *buf,
|
|
|
size_t count)
|
|
|
{
|
|
|
- kobject_synth_uevent(&drv->p->kobj, buf, count);
|
|
|
- return count;
|
|
|
+ int rc;
|
|
|
+
|
|
|
+ rc = kobject_synth_uevent(&drv->p->kobj, buf, count);
|
|
|
+ return rc ? rc : count;
|
|
|
}
|
|
|
static DRIVER_ATTR_WO(uevent);
|
|
|
|
|
|
@@ -831,8 +833,10 @@ static void klist_devices_put(struct klist_node *n)
|
|
|
static ssize_t bus_uevent_store(struct bus_type *bus,
|
|
|
const char *buf, size_t count)
|
|
|
{
|
|
|
- kobject_synth_uevent(&bus->p->subsys.kobj, buf, count);
|
|
|
- return count;
|
|
|
+ int rc;
|
|
|
+
|
|
|
+ rc = kobject_synth_uevent(&bus->p->subsys.kobj, buf, count);
|
|
|
+ return rc ? rc : count;
|
|
|
}
|
|
|
static BUS_ATTR(uevent, S_IWUSR, NULL, bus_uevent_store);
|
|
|
|