diff options
| author | Olof Johansson <olof@lixom.net> | 2012-03-08 09:27:07 -0800 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-03-08 09:27:07 -0800 |
| commit | a58f67e70a6cad021ceebd1c8919b898dd5d5de3 (patch) | |
| tree | 78cb630cb31a8cbec17463f9acc0f766707c232f /include/linux/regset.h | |
| parent | 4c6c826b22da9f6408b6bc6939a92aa0be838488 (diff) | |
| parent | 46e446db4fb2cdb2f1bc69d3981fa23738a42835 (diff) | |
Merge branch 'dt' of git://github.com/hzhuang1/linux into next/dt
* 'dt' of git://github.com/hzhuang1/linux: (6 commits)
Document: devicetree: add OF documents for arch-mmp
ARM: dts: append DTS file of pxa168
ARM: mmp: append OF support on pxa168
ARM: mmp: enable rtc clk in pxa168
i2c: pxa: add OF support
serial: pxa: add OF support
(plus update to v3.3-rc6)
Diffstat (limited to 'include/linux/regset.h')
| -rw-r--r-- | include/linux/regset.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/regset.h b/include/linux/regset.h index 8abee655622..686f37327a4 100644 --- a/include/linux/regset.h +++ b/include/linux/regset.h @@ -335,8 +335,11 @@ static inline int copy_regset_to_user(struct task_struct *target, { const struct user_regset *regset = &view->regsets[setno]; + if (!regset->get) + return -EOPNOTSUPP; + if (!access_ok(VERIFY_WRITE, data, size)) - return -EIO; + return -EFAULT; return regset->get(target, regset, offset, size, NULL, data); } @@ -358,8 +361,11 @@ static inline int copy_regset_from_user(struct task_struct *target, { const struct user_regset *regset = &view->regsets[setno]; + if (!regset->set) + return -EOPNOTSUPP; + if (!access_ok(VERIFY_READ, data, size)) - return -EIO; + return -EFAULT; return regset->set(target, regset, offset, size, NULL, data); } |
