]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: gamecube: Fix an IS_ERR() vs NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jan 2022 07:33:40 +0000 (10:33 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 16 Jan 2022 22:36:09 +0000 (23:36 +0100)
commit650c4bb80f718f8b8e5f34d401242bd8d1894e76
tree0a6c88b6422d51ae52d491f1c6675f4a122bcaef
parent2af566807aa35be86f8acfa6bfea988aa2799c5e
rtc: gamecube: Fix an IS_ERR() vs NULL check

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

Fixes: 0b1ba0cbb73c ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220107073340.GF22086@kili
drivers/rtc/rtc-gamecube.c