diff options
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 317a80c4d54c..fa20a8f0463a 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -268,6 +268,8 @@ static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to, | |||
268 | ops->retlen = ops->oobretlen = 0; | 268 | ops->retlen = ops->oobretlen = 0; |
269 | if (!mtd->_write_oob) | 269 | if (!mtd->_write_oob) |
270 | return -EOPNOTSUPP; | 270 | return -EOPNOTSUPP; |
271 | if (!(mtd->flags & MTD_WRITEABLE)) | ||
272 | return -EROFS; | ||
271 | return mtd->_write_oob(mtd, to, ops); | 273 | return mtd->_write_oob(mtd, to, ops); |
272 | } | 274 | } |
273 | 275 | ||