diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-04-12 04:32:53 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-04-22 11:56:18 -0400 |
commit | e73ef755fbb90b04f0cf494071b2be6bafcafbdc (patch) | |
tree | edfbfb627056ef5c3626a5eed8ebeb871035cc67 /drivers/rtc | |
parent | a897bf138c9b4435e17444efcc8269e9577f5165 (diff) |
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')
-rw-r--r-- | drivers/rtc/rtc-hid-sensor-time.c | 4 |
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) | |||
291 | "hid-sensor-time", &hid_time_rtc_ops, | 291 | "hid-sensor-time", &hid_time_rtc_ops, |
292 | THIS_MODULE); | 292 | THIS_MODULE); |
293 | 293 | ||
294 | if (IS_ERR_OR_NULL(time_state->rtc)) { | 294 | if (IS_ERR(time_state->rtc)) { |
295 | hid_device_io_stop(hsdev->hdev); | 295 | hid_device_io_stop(hsdev->hdev); |
296 | ret = time_state->rtc ? PTR_ERR(time_state->rtc) : -ENODEV; | 296 | ret = PTR_ERR(time_state->rtc); |
297 | time_state->rtc = NULL; | 297 | time_state->rtc = NULL; |
298 | dev_err(&pdev->dev, "rtc device register failed!\n"); | 298 | dev_err(&pdev->dev, "rtc device register failed!\n"); |
299 | goto err_rtc; | 299 | goto err_rtc; |