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>
This commit is contained in:
Uwe Kleine-König 2018-05-20 17:26:40 +02:00 committed by Alexandre Belloni
parent 48e9a9b203
commit 046dbb2420
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ int rtc_nvmem_register(struct rtc_device *rtc,
nvmem_config->dev = rtc->dev.parent; nvmem_config->dev = rtc->dev.parent;
nvmem_config->owner = rtc->owner; nvmem_config->owner = rtc->owner;
rtc->nvmem = nvmem_register(nvmem_config); rtc->nvmem = nvmem_register(nvmem_config);
if (IS_ERR_OR_NULL(rtc->nvmem)) if (IS_ERR(rtc->nvmem))
return PTR_ERR(rtc->nvmem); return PTR_ERR(rtc->nvmem);
/* Register the old ABI */ /* Register the old ABI */