summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-12-29 19:50:57 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-30 18:22:04 (GMT)
commit27d3e366091b13c26d5d996709fd9d99858455eb (patch)
treeab55dd336b63c74580d0ae6fdb66958ac5c078b6 /drivers/media
parent69c003996b4d05c190ebc0e3a578d6393cd497f6 (diff)
downloadlinux-27d3e366091b13c26d5d996709fd9d99858455eb.tar.xz
[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')
-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 81dd4c9..8423ee1 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 */