Fix allocated memory test

Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
Alan Carvalho de Assis 2024-06-27 17:58:19 -03:00 committed by Mateusz Szafoni
parent 09146beee9
commit 9cfe255a81
2 changed files with 2 additions and 2 deletions

View File

@ -284,7 +284,7 @@ int a4988_register(FAR const char *devpath, FAR struct a4988_ops_s *ops)
priv->ops = ops;
lower = kmm_malloc(sizeof(struct stepper_lowerhalf_s));
if (priv == NULL)
if (lower == NULL)
{
stperr("Failed to allocate instance\n");
kmm_free(priv);

View File

@ -314,7 +314,7 @@ int drv8825_register(FAR const char *devpath, FAR struct drv8825_ops_s *ops)
priv->ops = ops;
lower = kmm_malloc(sizeof(struct stepper_lowerhalf_s));
if (priv == NULL)
if (lower == NULL)
{
stperr("Failed to allocate instance\n");
kmm_free(priv);