summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/booke_wdt.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-05 13:04:34 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-05 13:04:34 +0800
commitfc600432cd23e35c85de2ff4468d816d6938a112 (patch)
treec191c51e4458ec31c1d8254f01e23b2e1574b6f4 /drivers/watchdog/booke_wdt.c
parentdb61550931957ee6c7dba751662919424b4344f3 (diff)
parent4cbe5a555fa58a79b6ecbb6c531b8bab0650778d (diff)
downloadop-kernel-dev-fc600432cd23e35c85de2ff4468d816d6938a112.zip
op-kernel-dev-fc600432cd23e35c85de2ff4468d816d6938a112.tar.gz
Merge tag 'v3.6-rc4' into asoc-omap
Linux 3.6-rc4
Diffstat (limited to 'drivers/watchdog/booke_wdt.c')
-rw-r--r--drivers/watchdog/booke_wdt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 3fe82d0..5b06d31 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -166,18 +166,17 @@ static long booke_wdt_ioctl(struct file *file,
switch (cmd) {
case WDIOC_GETSUPPORT:
- if (copy_to_user((void *)arg, &ident, sizeof(ident)))
- return -EFAULT;
+ return copy_to_user(p, &ident, sizeof(ident)) ? -EFAULT : 0;
case WDIOC_GETSTATUS:
return put_user(0, p);
case WDIOC_GETBOOTSTATUS:
/* XXX: something is clearing TSR */
tmp = mfspr(SPRN_TSR) & TSR_WRS(3);
/* returns CARDRESET if last reset was caused by the WDT */
- return (tmp ? WDIOF_CARDRESET : 0);
+ return put_user((tmp ? WDIOF_CARDRESET : 0), p);
case WDIOC_SETOPTIONS:
if (get_user(tmp, p))
- return -EINVAL;
+ return -EFAULT;
if (tmp == WDIOS_ENABLECARD) {
booke_wdt_ping();
break;
OpenPOWER on IntegriCloud