diff options
Diffstat (limited to 'drivers/media/usb/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_v4l2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 68d59b527492..b2dc32623a71 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c | |||
@@ -315,7 +315,7 @@ static int uvc_v4l2_set_format(struct uvc_streaming *stream, | |||
315 | goto done; | 315 | goto done; |
316 | } | 316 | } |
317 | 317 | ||
318 | memcpy(&stream->ctrl, &probe, sizeof probe); | 318 | stream->ctrl = probe; |
319 | stream->cur_format = format; | 319 | stream->cur_format = format; |
320 | stream->cur_frame = frame; | 320 | stream->cur_frame = frame; |
321 | 321 | ||
@@ -387,7 +387,7 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream, | |||
387 | return -EBUSY; | 387 | return -EBUSY; |
388 | } | 388 | } |
389 | 389 | ||
390 | memcpy(&probe, &stream->ctrl, sizeof probe); | 390 | probe = stream->ctrl; |
391 | probe.dwFrameInterval = | 391 | probe.dwFrameInterval = |
392 | uvc_try_frame_interval(stream->cur_frame, interval); | 392 | uvc_try_frame_interval(stream->cur_frame, interval); |
393 | 393 | ||
@@ -398,7 +398,7 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream, | |||
398 | return ret; | 398 | return ret; |
399 | } | 399 | } |
400 | 400 | ||
401 | memcpy(&stream->ctrl, &probe, sizeof probe); | 401 | stream->ctrl = probe; |
402 | mutex_unlock(&stream->mutex); | 402 | mutex_unlock(&stream->mutex); |
403 | 403 | ||
404 | /* Return the actual frame period. */ | 404 | /* Return the actual frame period. */ |
@@ -501,8 +501,8 @@ static int uvc_v4l2_open(struct file *file) | |||
501 | if (atomic_inc_return(&stream->dev->users) == 1) { | 501 | if (atomic_inc_return(&stream->dev->users) == 1) { |
502 | ret = uvc_status_start(stream->dev); | 502 | ret = uvc_status_start(stream->dev); |
503 | if (ret < 0) { | 503 | if (ret < 0) { |
504 | usb_autopm_put_interface(stream->dev->intf); | ||
505 | atomic_dec(&stream->dev->users); | 504 | atomic_dec(&stream->dev->users); |
505 | usb_autopm_put_interface(stream->dev->intf); | ||
506 | kfree(handle); | 506 | kfree(handle); |
507 | return ret; | 507 | return ret; |
508 | } | 508 | } |