Skip to content

Commit

Permalink
[media] gscpa_vicam: Fix oops if unplugged while streaming
Browse files Browse the repository at this point in the history
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Dec 30, 2011
1 parent 69c0039 commit 27d3e36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/video/gspca/vicam.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
dev->work_thread = NULL;
mutex_lock(&gspca_dev->usb_lock);

vicam_set_camera_power(gspca_dev, 0);
if (gspca_dev->present)
vicam_set_camera_power(gspca_dev, 0);
}

/* Table of supported USB devices */
Expand Down

0 comments on commit 27d3e36

Please sign in to comment.