Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 777d8ae5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexandre Belloni
Browse files

rtc: sysfs: fix NULL check in rtc_add_groups()



devm_kcalloc() returns NULL, it never returns error pointers.  In the
current code we would return PTR_ERR(NULL) which is success, instead of
returning the -ENOMEM error code.

Fixes: a0a1a1ba ("rtc: sysfs: facilitate attribute add to rtc device")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 725e0e15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment