Skip to content

Commit

Permalink
Staging: sep: fix time handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 0a18d7b commit 7913c21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit 7913c21

Please sign in to comment.