diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-05-20 17:26:40 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-21 22:34:38 +0200 |
commit | 046dbb2420cee74b31fd2ce266d3e2629d8c7b8a (patch) | |
tree | 745f823c644ab6af8f4dae77656e06e29d9cc194 /drivers/rtc/nvmem.c | |
parent | rtc: ds1742: don't explicitly specify word_size and stride of nvmem (diff) | |
download | linux-046dbb2420cee74b31fd2ce266d3e2629d8c7b8a.tar.xz linux-046dbb2420cee74b31fd2ce266d3e2629d8c7b8a.zip |
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.c | 2 |
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 */ |