state: mtd_get_meminfo: open path readonly instead of readwrite
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
a571c94254
commit
6fecafad03
|
@ -900,7 +900,7 @@ static int mtd_get_meminfo(const char *path, struct mtd_info_user *meminfo)
|
|||
{
|
||||
int fd, ret;
|
||||
|
||||
fd = open(path, O_RDWR);
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
|
|
Loading…
Reference in New Issue