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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:17 +0000 (17:48 +0200)
commitfa1482c4f522ef394207f310f7015f9b4fc06c9a
treea3e7d29ec803e9e506c002a4074f9dc17e3639bc
parentefdcc5c80262aef339d0b7f2b50ce5fbdfc047ba
rtc: rc5t619: Fix an ERR_PTR vs NULL check

[ Upstream commit 11ddbdfb68e4f9791e4bd4f8d7c87d3f19670967 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-rc5t619.c