summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vicam.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-12-29 20:50:57 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-30 19:22:04 +0100
commit27d3e366091b13c26d5d996709fd9d99858455eb (patch)
treeab55dd336b63c74580d0ae6fdb66958ac5c078b6 /drivers/media/video/gspca/vicam.c
parent[media] gspca_pac207: Raise max exposure + various autogain setting tweaks (diff)
downloadlinux-27d3e366091b13c26d5d996709fd9d99858455eb.tar.xz
linux-27d3e366091b13c26d5d996709fd9d99858455eb.zip
[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>
Diffstat (limited to 'drivers/media/video/gspca/vicam.c')
-rw-r--r--drivers/media/video/gspca/vicam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/vicam.c b/drivers/media/video/gspca/vicam.c
index 81dd4c99d025..8423ee1c305c 100644
--- a/drivers/media/video/gspca/vicam.c
+++ b/drivers/media/video/gspca/vicam.c
@@ -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 */