rtc: rc5t619: Fix an ERR_PTR vs NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Apr 2020 09:28:52 +0000 (12:28 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 15 Apr 2020 07:58:24 +0000 (09:58 +0200)
commit11ddbdfb68e4f9791e4bd4f8d7c87d3f19670967
tree5ddf3e77e46932fe000efd9d7b0c77ed284faf4d
parent944ed452eb1b4241c8bd693b8b689fe8b888c445
rtc: rc5t619: Fix an ERR_PTR vs NULL check

The devm_kzalloc() function returns NULL on error, it doesn't return
error pointers so this check doesn't work.

Fixes: 540d1e15393d ("rtc: rc5t619: Add Ricoh RC5T619 RTC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200407092852.GI68494@mwanda
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rc5t619.c