summaryrefslogtreecommitdiff
path: root/drivers/staging/sep
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-08-07 19:24:00 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:13 -0700
commit7913c21a25a9d54b093bed3522d35b188aadf6a4 (patch)
treefd60d9a98b75adc8fb1aec9a226f6aa367809f76 /drivers/staging/sep
parent0a18d7b5f36f3c77a239ee752c4ce1197af7b617 (diff)
Staging: sep: fix time handler
Cleaning up the code reveals an obvious thinko Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep')
-rw-r--r--drivers/staging/sep/sep_driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index fe46c1b46472..c2d9cab85d42 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -2143,7 +2143,9 @@ static int sep_get_time_handler(unsigned long arg)
struct sep_driver_get_time_t command_args;
error = sep_set_time(&command_args.time_physical_address, &command_args.time_value);
- error = copy_to_user((void *) arg, (void *) &command_args, sizeof(struct sep_driver_get_time_t));
+ if (error == 0)
+ error = copy_to_user((void __user *)arg,
+ &command_args, sizeof(struct sep_driver_get_time_t));
return error;
}