drivers/rtc/class.c: fix device_register() error handling