summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-hid-sensor-time.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-04-12 11:32:53 +0300
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-04-22 18:56:18 +0300
commite73ef755fbb90b04f0cf494071b2be6bafcafbdc (patch)
treeedfbfb627056ef5c3626a5eed8ebeb871035cc67 /drivers/rtc/rtc-hid-sensor-time.c
parenta897bf138c9b4435e17444efcc8269e9577f5165 (diff)
downloadlinux-e73ef755fbb90b04f0cf494071b2be6bafcafbdc.tar.xz
rtc: hid-sensor-time: remove some dead code
devm_rtc_device_register() doesn't ever return NULL so there is no need to check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-hid-sensor-time.c')
-rw-r--r--drivers/rtc/rtc-hid-sensor-time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index c398f74234c6..2751dba850c6 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -291,9 +291,9 @@ static int hid_time_probe(struct platform_device *pdev)
"hid-sensor-time", &hid_time_rtc_ops,
THIS_MODULE);
- if (IS_ERR_OR_NULL(time_state->rtc)) {
+ if (IS_ERR(time_state->rtc)) {
hid_device_io_stop(hsdev->hdev);
- ret = time_state->rtc ? PTR_ERR(time_state->rtc) : -ENODEV;
+ ret = PTR_ERR(time_state->rtc);
time_state->rtc = NULL;
dev_err(&pdev->dev, "rtc device register failed!\n");
goto err_rtc;