summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bsps/shared/grlib/1553/b1553rt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsps/shared/grlib/1553/b1553rt.c b/bsps/shared/grlib/1553/b1553rt.c
index d7257e461f..df72ada285 100644
--- a/bsps/shared/grlib/1553/b1553rt.c
+++ b/bsps/shared/grlib/1553/b1553rt.c
@@ -619,7 +619,7 @@ static rtems_device_driver rt_write(rtems_device_major_number major, rtems_devic
static rtems_device_driver rt_control(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
{
rtems_libio_ioctl_args_t *ioarg = (rtems_libio_ioctl_args_t *) arg;
- unsigned int *data = ioarg->buffer;
+ unsigned int *data;
rt_priv *rt;
struct drvmgr_dev *dev;
@@ -636,6 +636,8 @@ static rtems_device_driver rt_control(rtems_device_major_number major, rtems_dev
return RTEMS_INVALID_NAME;
}
+ data = ioarg->buffer;
+
ioarg->ioctl_return = 0;
switch (ioarg->command) {