Commit 27d3e366 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

[media] gscpa_vicam: Fix oops if unplugged while streaming

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 69c00399
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment