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:
parent
48e9a9b203
commit
046dbb2420
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue