aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/mtd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 721a63ffeb96..7122efdc6d99 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -342,6 +342,8 @@ static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to,
342static inline int mtd_get_fact_prot_info(struct mtd_info *mtd, 342static inline int mtd_get_fact_prot_info(struct mtd_info *mtd,
343 struct otp_info *buf, size_t len) 343 struct otp_info *buf, size_t len)
344{ 344{
345 if (!mtd->get_fact_prot_info)
346 return -EOPNOTSUPP;
345 return mtd->get_fact_prot_info(mtd, buf, len); 347 return mtd->get_fact_prot_info(mtd, buf, len);
346} 348}
347 349
@@ -357,6 +359,8 @@ static inline int mtd_get_user_prot_info(struct mtd_info *mtd,
357 struct otp_info *buf, 359 struct otp_info *buf,
358 size_t len) 360 size_t len)
359{ 361{
362 if (!mtd->get_user_prot_info)
363 return -EOPNOTSUPP;
360 return mtd->get_user_prot_info(mtd, buf, len); 364 return mtd->get_user_prot_info(mtd, buf, len);
361} 365}
362 366