diff --git a/drivers/sensors/apds9960.c b/drivers/sensors/apds9960.c index 65e5e200a2..aa97c345cf 100644 --- a/drivers/sensors/apds9960.c +++ b/drivers/sensors/apds9960.c @@ -1281,6 +1281,7 @@ int apds9960_register(FAR const char *devpath, { snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); + return ret; } /* Attach to the interrupt */