drivers/mtd/mtd_config.c: mtdconfig_register() returned OK intead of -ENOMEM on failed malloc

This commit is contained in:
Michał Łyszczek 2018-05-08 06:48:00 -06:00 committed by Gregory Nutt
parent 6435a2b25b
commit 249d7e0d84

View File

@ -1441,7 +1441,7 @@ static int mtdconfig_poll(FAR struct file *filep, FAR struct pollfd *fds,
int mtdconfig_register(FAR struct mtd_dev_s *mtd)
{
int ret = OK;
int ret = -ENOMEM;
struct mtdconfig_struct_s *dev;
struct mtd_geometry_s geo; /* Device geometry */