struct w1_master *md = NULL;
struct w1_slave *sl = NULL;
char *event_owner, *name;
- int err;
+ int err = 0;
if (dev->driver == &w1_master_driver) {
md = container_of(dev, struct w1_master, dev);
event_owner, name, dev_name(dev));
if (dev->driver != &w1_slave_driver || !sl)
- return 0;
+ goto end;
err = add_uevent_var(env, "W1_FID=%02X", sl->reg_num.family);
if (err)
- return err;
+ goto end;
err = add_uevent_var(env, "W1_SLAVE_ID=%024LX",
(unsigned long long)sl->reg_num.id);
- if (err)
- return err;
-
- return 0;
-};
+end:
+ return err;
+}
#else
static int w1_uevent(struct device *dev, struct kobj_uevent_env *env)
{