staging: alarm-dev: information leak in alarm_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Jun 2013 09:02:31 +0000 (02:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2013 20:38:55 +0000 (13:38 -0700)
commite919b86c3b018c0e0c5e522354e743dcc0824ee1
tree213c6525f5beb9afd7c94533514eac16ab3b0203
parent76554b87c85c0ac5ba56797dda670bad6677f9f1
staging: alarm-dev: information leak in alarm_ioctl()

Smatch complains that if we pass an invalid clock type then "ts" is
never set.  We need to check for errors earlier, otherwise we end up
passing uninitialized stack data to userspace.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/alarm-dev.c