summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-hid-sensor-time.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2017-05-18 10:19:33 -0600
committerJonathan Corbet <corbet@lwn.net>2017-05-18 10:19:33 -0600
commita1a9af4e9d9ec65c22d3cfe449e0420d17dbedba (patch)
tree05bd08bb1987aa92b84b49b9ee4eee0ba3b2917f /drivers/rtc/rtc-hid-sensor-time.c
parent25a0da73f24c95d57381bedd9cd89e4929b1bfde (diff)
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
Merge tag 'v4.12-rc1' into docs-next
Linux 4.12-rc1
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;