@@ -475,7 +475,7 @@ static u32 redrat3_get_timeout(struct redrat3_dev *rr3)
static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
{
- struct redrat3_dev *rr3 = rc_dev->priv;
+ struct redrat3_dev *rr3;
__be32 *timeout;
int ret;
@@ -484,6 +484,7 @@ static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
return -ENOMEM;
*timeout = cpu_to_be32(redrat3_us_to_len(timeoutns / 1000));
+ rr3 = rc_dev->priv;
ret = usb_control_msg(rr3->udev,
usb_sndctrlpipe(rr3->udev, 0),
RR3_SET_IR_PARAM,