diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-08-19 00:00:41 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-08-21 09:57:23 +0200 |
commit | 44c638ce4ec6fb9d33978348ebb90847b9aa274a (patch) | |
tree | 92f636c375d44dcac282dd1629ba25bfe2bb7b98 /drivers/rtc/rtc-ab-eoz9.c | |
parent | rtc: class: add debug message when registration fails (diff) | |
download | linux-44c638ce4ec6fb9d33978348ebb90847b9aa274a.tar.xz linux-44c638ce4ec6fb9d33978348ebb90847b9aa274a.zip |
rtc: remove superfluous error message
The RTC core now has error messages in case of registration failure, there
is no need to have other messages in the drivers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20190818220041.17833-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ab-eoz9.c')
-rw-r--r-- | drivers/rtc/rtc-ab-eoz9.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c index e4f6e0061ccf..d690985caa4c 100644 --- a/drivers/rtc/rtc-ab-eoz9.c +++ b/drivers/rtc/rtc-ab-eoz9.c @@ -390,35 +390,31 @@ static int abeoz9_probe(struct i2c_client *client, if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE_DATA | - I2C_FUNC_SMBUS_I2C_BLOCK)) { - ret = -ENODEV; - goto err; - } + I2C_FUNC_SMBUS_I2C_BLOCK)) + return -ENODEV; regmap = devm_regmap_init_i2c(client, &abeoz9_rtc_regmap_config); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); dev_err(dev, "regmap allocation failed: %d\n", ret); - goto err; + return ret; } data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); - if (!data) { - ret = -ENOMEM; - goto err; - } + if (!data) + return -ENOMEM; data->regmap = regmap; dev_set_drvdata(dev, data); ret = abeoz9_rtc_setup(dev, client->dev.of_node); if (ret) - goto err; + return ret; data->rtc = devm_rtc_allocate_device(dev); ret = PTR_ERR_OR_ZERO(data->rtc); if (ret) - goto err; + return ret; data->rtc->ops = &rtc_ops; data->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; @@ -426,14 +422,10 @@ static int abeoz9_probe(struct i2c_client *client, ret = rtc_register_device(data->rtc); if (ret) - goto err; + return ret; abeoz9_hwmon_register(dev, data); return 0; - -err: - dev_err(dev, "unable to register RTC device (%d)\n", ret); - return ret; } #ifdef CONFIG_OF |