[media] gscpa_vicam: Fix oops if unplugged while streaming

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans de Goede 2011-12-29 16:50:57 -03:00 committed by Mauro Carvalho Chehab
parent 69c003996b
commit 27d3e36609
1 changed files with 2 additions and 1 deletions

View File

@ -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 */