mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
drivers/mkrd.c: Fix a warning found in build testing that occurs when CONFIG_DEBUG_INFO is enabled.
This commit is contained in:
@@ -39,6 +39,10 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/drivers/ramdisk.h>
|
#include <nuttx/drivers/ramdisk.h>
|
||||||
|
|
||||||
@@ -79,6 +83,7 @@ int mkrd(int minor, uint32_t nsectors, uint16_t sectsize, uint8_t rdflags)
|
|||||||
buffer = (FAR uint8_t *)kmm_malloc(sectsize * nsectors);
|
buffer = (FAR uint8_t *)kmm_malloc(sectsize * nsectors);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
{
|
{
|
||||||
|
ferr("ERROR: kmm_malloc() failed: %d\n", ret);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user