diff options
Diffstat (limited to 'include/linux')
| -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 e488cf910914..7cd56d2b9419 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -381,6 +381,8 @@ static inline int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to, | |||
| 381 | u_char *buf) | 381 | u_char *buf) |
| 382 | { | 382 | { |
| 383 | *retlen = 0; | 383 | *retlen = 0; |
| 384 | if (!mtd->write_user_prot_reg) | ||
| 385 | return -EOPNOTSUPP; | ||
| 384 | return mtd->write_user_prot_reg(mtd, to, len, retlen, buf); | 386 | return mtd->write_user_prot_reg(mtd, to, len, retlen, buf); |
| 385 | } | 387 | } |
| 386 | 388 | ||
