diff options
| -rw-r--r-- | drivers/rtc/rtc-abx80x.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c index 442e62a3c9a9..b033bc556f5d 100644 --- a/drivers/rtc/rtc-abx80x.c +++ b/drivers/rtc/rtc-abx80x.c | |||
| @@ -620,10 +620,6 @@ static int abx80x_probe(struct i2c_client *client, | |||
| 620 | 620 | ||
| 621 | rtc->ops = &abx80x_rtc_ops; | 621 | rtc->ops = &abx80x_rtc_ops; |
| 622 | 622 | ||
| 623 | err = rtc_register_device(rtc); | ||
| 624 | if (err) | ||
| 625 | return err; | ||
| 626 | |||
| 627 | i2c_set_clientdata(client, rtc); | 623 | i2c_set_clientdata(client, rtc); |
| 628 | 624 | ||
| 629 | if (client->irq > 0) { | 625 | if (client->irq > 0) { |
| @@ -650,10 +646,14 @@ static int abx80x_probe(struct i2c_client *client, | |||
| 650 | err = devm_add_action_or_reset(&client->dev, | 646 | err = devm_add_action_or_reset(&client->dev, |
| 651 | rtc_calib_remove_sysfs_group, | 647 | rtc_calib_remove_sysfs_group, |
| 652 | &client->dev); | 648 | &client->dev); |
| 653 | if (err) | 649 | if (err) { |
| 654 | dev_err(&client->dev, | 650 | dev_err(&client->dev, |
| 655 | "Failed to add sysfs cleanup action: %d\n", | 651 | "Failed to add sysfs cleanup action: %d\n", |
| 656 | err); | 652 | err); |
| 653 | return err; | ||
| 654 | } | ||
| 655 | |||
| 656 | err = rtc_register_device(rtc); | ||
| 657 | 657 | ||
| 658 | return err; | 658 | return err; |
| 659 | } | 659 | } |
