diff options
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/w1.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 69075c3dfc73..79e488db5104 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -557,7 +557,7 @@ static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
557 | struct w1_master *md = NULL; | 557 | struct w1_master *md = NULL; |
558 | struct w1_slave *sl = NULL; | 558 | struct w1_slave *sl = NULL; |
559 | char *event_owner, *name; | 559 | char *event_owner, *name; |
560 | int err; | 560 | int err = 0; |
561 | 561 | ||
562 | if (dev->driver == &w1_master_driver) { | 562 | if (dev->driver == &w1_master_driver) { |
563 | md = container_of(dev, struct w1_master, dev); | 563 | md = container_of(dev, struct w1_master, dev); |
@@ -576,19 +576,17 @@ static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
576 | event_owner, name, dev_name(dev)); | 576 | event_owner, name, dev_name(dev)); |
577 | 577 | ||
578 | if (dev->driver != &w1_slave_driver || !sl) | 578 | if (dev->driver != &w1_slave_driver || !sl) |
579 | return 0; | 579 | goto end; |
580 | 580 | ||
581 | err = add_uevent_var(env, "W1_FID=%02X", sl->reg_num.family); | 581 | err = add_uevent_var(env, "W1_FID=%02X", sl->reg_num.family); |
582 | if (err) | 582 | if (err) |
583 | return err; | 583 | goto end; |
584 | 584 | ||
585 | err = add_uevent_var(env, "W1_SLAVE_ID=%024LX", | 585 | err = add_uevent_var(env, "W1_SLAVE_ID=%024LX", |
586 | (unsigned long long)sl->reg_num.id); | 586 | (unsigned long long)sl->reg_num.id); |
587 | if (err) | 587 | end: |
588 | return err; | 588 | return err; |
589 | 589 | } | |
590 | return 0; | ||
591 | }; | ||
592 | #else | 590 | #else |
593 | static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) | 591 | static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) |
594 | { | 592 | { |