diff options
Diffstat (limited to 'drivers/media/video/gspca/finepix.c')
-rw-r--r-- | drivers/media/video/gspca/finepix.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c index 0107513cd728..d0befe981098 100644 --- a/drivers/media/video/gspca/finepix.c +++ b/drivers/media/video/gspca/finepix.c | |||
@@ -94,7 +94,7 @@ static void dostream(struct work_struct *work) | |||
94 | 94 | ||
95 | /* loop reading a frame */ | 95 | /* loop reading a frame */ |
96 | again: | 96 | again: |
97 | while (gspca_dev->present && gspca_dev->streaming) { | 97 | while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { |
98 | 98 | ||
99 | /* request a frame */ | 99 | /* request a frame */ |
100 | mutex_lock(&gspca_dev->usb_lock); | 100 | mutex_lock(&gspca_dev->usb_lock); |
@@ -102,7 +102,8 @@ again: | |||
102 | mutex_unlock(&gspca_dev->usb_lock); | 102 | mutex_unlock(&gspca_dev->usb_lock); |
103 | if (ret < 0) | 103 | if (ret < 0) |
104 | break; | 104 | break; |
105 | if (!gspca_dev->present || !gspca_dev->streaming) | 105 | if (gspca_dev->frozen || !gspca_dev->dev || |
106 | !gspca_dev->streaming) | ||
106 | break; | 107 | break; |
107 | 108 | ||
108 | /* the frame comes in parts */ | 109 | /* the frame comes in parts */ |
@@ -117,7 +118,8 @@ again: | |||
117 | * error. Just restart. */ | 118 | * error. Just restart. */ |
118 | goto again; | 119 | goto again; |
119 | } | 120 | } |
120 | if (!gspca_dev->present || !gspca_dev->streaming) | 121 | if (gspca_dev->frozen || !gspca_dev->dev || |
122 | !gspca_dev->streaming) | ||
121 | goto out; | 123 | goto out; |
122 | if (len < FPIX_MAX_TRANSFER || | 124 | if (len < FPIX_MAX_TRANSFER || |
123 | (data[len - 2] == 0xff && | 125 | (data[len - 2] == 0xff && |