diff --git a/drivers/mtd/filemtd.c b/drivers/mtd/filemtd.c index 1ef36b84d6080..87c9e71022988 100644 --- a/drivers/mtd/filemtd.c +++ b/drivers/mtd/filemtd.c @@ -813,7 +813,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, off_t offset, /* Set the file open mode. */ - mode = O_RDONLY | O_WRONLY | O_CLOEXEC; + mode = O_RDWR | O_CLOEXEC; /* Try to open the file. NOTE that block devices will use a character * driver proxy.