summaryrefslogtreecommitdiff
path: root/drivers/oprofile/oprofile_files.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-01-07 11:51:28 +0000
committerArnd Bergmann <arnd@arndb.de>2012-01-07 11:51:28 +0000
commit40ba95fdf158713377d47736b1b3a9d75f4f2515 (patch)
tree17a3216542d1107f777fd82577c91aebbce597d6 /drivers/oprofile/oprofile_files.c
parent70d84a6431d732cbc4e68e72b6890cdd3865d43d (diff)
parent0575fb754dbfc32a01f297e778533340a533ec68 (diff)
downloadlinux-3.10-40ba95fdf158713377d47736b1b3a9d75f4f2515.tar.gz
linux-3.10-40ba95fdf158713377d47736b1b3a9d75f4f2515.tar.bz2
linux-3.10-40ba95fdf158713377d47736b1b3a9d75f4f2515.zip
Merge branch 'depends/rmk/restart' into next/cleanup
Conflicts: arch/arm/mach-at91/at91cap9.c arch/arm/mach-at91/at91sam9260.c arch/arm/mach-at91/at91sam9261.c arch/arm/mach-at91/at91sam9263.c arch/arm/mach-at91/at91sam9g45.c arch/arm/mach-at91/at91sam9rl.c arch/arm/mach-exynos/cpu.c arch/arm/mach-shmobile/board-kota2.c This resolves a bunch of conflicts between the arm-soc tree and changes from the arm tree that have gone upstream. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/oprofile/oprofile_files.c')
-rw-r--r--drivers/oprofile/oprofile_files.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c
index 89f63456646..84a208dbed9 100644
--- a/drivers/oprofile/oprofile_files.c
+++ b/drivers/oprofile/oprofile_files.c
@@ -45,7 +45,7 @@ static ssize_t timeout_write(struct file *file, char const __user *buf,
return -EINVAL;
retval = oprofilefs_ulong_from_user(&val, buf, count);
- if (retval)
+ if (retval <= 0)
return retval;
retval = oprofile_set_timeout(val);
@@ -84,7 +84,7 @@ static ssize_t depth_write(struct file *file, char const __user *buf, size_t cou
return -EINVAL;
retval = oprofilefs_ulong_from_user(&val, buf, count);
- if (retval)
+ if (retval <= 0)
return retval;
retval = oprofile_set_ulong(&oprofile_backtrace_depth, val);
@@ -141,9 +141,10 @@ static ssize_t enable_write(struct file *file, char const __user *buf, size_t co
return -EINVAL;
retval = oprofilefs_ulong_from_user(&val, buf, count);
- if (retval)
+ if (retval <= 0)
return retval;
+ retval = 0;
if (val)
retval = oprofile_start();
else