aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-07-24 10:12:10 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 07:19:11 -0400
commitdbcce7cf1eb95c704faa3fff1acc974010c8e5a4 (patch)
tree6c4544fe4e5bab573fe216249c4b08b15ec53fc7 /drivers/rtc
parentf0b63a1d5a4a4d9d60fe728ede0fa78ec5aab8be (diff)
rtc: rx8025: remove useless probe error message
It is useless to print a message when probe fails as the user is already aware that it failed. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-rx8025.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index be91e922a139..612b6876cbd5 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -513,20 +513,18 @@ static int rx8025_probe(struct i2c_client *client,
513{ 513{
514 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 514 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
515 struct rx8025_data *rx8025; 515 struct rx8025_data *rx8025;
516 int err, need_reset = 0; 516 int err = 0, need_reset = 0;
517 517
518 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA 518 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
519 | I2C_FUNC_SMBUS_I2C_BLOCK)) { 519 | I2C_FUNC_SMBUS_I2C_BLOCK)) {
520 dev_err(&adapter->dev, 520 dev_err(&adapter->dev,
521 "doesn't support required functionality\n"); 521 "doesn't support required functionality\n");
522 err = -EIO; 522 return -EIO;
523 goto errout;
524 } 523 }
525 524
526 rx8025 = devm_kzalloc(&client->dev, sizeof(*rx8025), GFP_KERNEL); 525 rx8025 = devm_kzalloc(&client->dev, sizeof(*rx8025), GFP_KERNEL);
527 if (!rx8025) { 526 if (!rx8025) {
528 err = -ENOMEM; 527 return -ENOMEM;
529 goto errout;
530 } 528 }
531 529
532 rx8025->client = client; 530 rx8025->client = client;
@@ -534,7 +532,7 @@ static int rx8025_probe(struct i2c_client *client,
534 532
535 err = rx8025_init_client(client, &need_reset); 533 err = rx8025_init_client(client, &need_reset);
536 if (err) 534 if (err)
537 goto errout; 535 return err;
538 536
539 if (need_reset) { 537 if (need_reset) {
540 struct rtc_time tm; 538 struct rtc_time tm;
@@ -547,9 +545,8 @@ static int rx8025_probe(struct i2c_client *client,
547 rx8025->rtc = devm_rtc_device_register(&client->dev, client->name, 545 rx8025->rtc = devm_rtc_device_register(&client->dev, client->name,
548 &rx8025_rtc_ops, THIS_MODULE); 546 &rx8025_rtc_ops, THIS_MODULE);
549 if (IS_ERR(rx8025->rtc)) { 547 if (IS_ERR(rx8025->rtc)) {
550 err = PTR_ERR(rx8025->rtc);
551 dev_err(&client->dev, "unable to register the class device\n"); 548 dev_err(&client->dev, "unable to register the class device\n");
552 goto errout; 549 return PTR_ERR(rx8025->rtc);
553 } 550 }
554 551
555 if (client->irq > 0) { 552 if (client->irq > 0) {
@@ -559,7 +556,7 @@ static int rx8025_probe(struct i2c_client *client,
559 client); 556 client);
560 if (err) { 557 if (err) {
561 dev_err(&client->dev, "unable to request IRQ\n"); 558 dev_err(&client->dev, "unable to request IRQ\n");
562 goto errout; 559 return err;
563 } 560 }
564 } 561 }
565 562
@@ -567,13 +564,6 @@ static int rx8025_probe(struct i2c_client *client,
567 rx8025->rtc->max_user_freq = 1; 564 rx8025->rtc->max_user_freq = 1;
568 565
569 err = rx8025_sysfs_register(&client->dev); 566 err = rx8025_sysfs_register(&client->dev);
570 if (err)
571 goto errout;
572
573 return 0;
574
575errout:
576 dev_err(&adapter->dev, "probing for rx8025 failed\n");
577 return err; 567 return err;
578} 568}
579 569