summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-12-29 16:50:57 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-30 16:22:04 -0200
commit27d3e366091b13c26d5d996709fd9d99858455eb (patch)
treeab55dd336b63c74580d0ae6fdb66958ac5c078b6 /drivers
parent69c003996b4d05c190ebc0e3a578d6393cd497f6 (diff)
[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')
-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 81dd4c99d02..8423ee1c305 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 */