aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdchar.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-29 03:45:04 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:26:18 -0500
commite2936b2af5562c8c66060e2bc2ae2e209d0acd3d (patch)
tree99af09f8049f9fd76abca6d630ff333b169ab25f /drivers/mtd/mtdchar.c
parent27c151a5e52efaa46d0938984f2ef591bdcb6d5b (diff)
mtd: do not use mtd->lock_user_prot_reg directly
Instead, check the -EOPNOTSUPP return code of 'mtd_lock_user_prot_reg()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r--drivers/mtd/mtdchar.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 25bbbc3aa665..2020a169ed9c 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -949,8 +949,6 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
949 return -EINVAL; 949 return -EINVAL;
950 if (copy_from_user(&oinfo, argp, sizeof(oinfo))) 950 if (copy_from_user(&oinfo, argp, sizeof(oinfo)))
951 return -EFAULT; 951 return -EFAULT;
952 if (!mtd->lock_user_prot_reg)
953 return -EOPNOTSUPP;
954 ret = mtd_lock_user_prot_reg(mtd, oinfo.start, oinfo.length); 952 ret = mtd_lock_user_prot_reg(mtd, oinfo.start, oinfo.length);
955 break; 953 break;
956 } 954 }