summaryrefslogtreecommitdiff
path: root/drivers/rtc/nvmem.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2018-05-20 17:26:40 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-21 22:34:38 +0200
commit046dbb2420cee74b31fd2ce266d3e2629d8c7b8a (patch)
tree745f823c644ab6af8f4dae77656e06e29d9cc194 /drivers/rtc/nvmem.c
parent48e9a9b203affc57a2bf6a0d0483472dd950a455 (diff)
rtc: nvmem: don't use IS_ERR_OR_NULL
nvmem_register() never returns NULL, so IS_ERR is good enough here. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/nvmem.c')
-rw-r--r--drivers/rtc/nvmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/nvmem.c b/drivers/rtc/nvmem.c
index 17ec4c8d0fad..36ab183c42f1 100644
--- a/drivers/rtc/nvmem.c
+++ b/drivers/rtc/nvmem.c
@@ -94,7 +94,7 @@ int rtc_nvmem_register(struct rtc_device *rtc,
nvmem_config->dev = rtc->dev.parent;
nvmem_config->owner = rtc->owner;
rtc->nvmem = nvmem_register(nvmem_config);
- if (IS_ERR_OR_NULL(rtc->nvmem))
+ if (IS_ERR(rtc->nvmem))
return PTR_ERR(rtc->nvmem);
/* Register the old ABI */