diff options
Diffstat (limited to 'drivers/ieee1394/raw1394.c')
-rw-r--r-- | drivers/ieee1394/raw1394.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index d1594427601f..2cf4ae75beca 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -2268,6 +2268,8 @@ static ssize_t raw1394_write(struct file *file, const char __user * buffer, | |||
2268 | return -EFAULT; | 2268 | return -EFAULT; |
2269 | } | 2269 | } |
2270 | 2270 | ||
2271 | mutex_lock(&fi->state_mutex); | ||
2272 | |||
2271 | switch (fi->state) { | 2273 | switch (fi->state) { |
2272 | case opened: | 2274 | case opened: |
2273 | retval = state_opened(fi, req); | 2275 | retval = state_opened(fi, req); |
@@ -2282,6 +2284,8 @@ static ssize_t raw1394_write(struct file *file, const char __user * buffer, | |||
2282 | break; | 2284 | break; |
2283 | } | 2285 | } |
2284 | 2286 | ||
2287 | mutex_unlock(&fi->state_mutex); | ||
2288 | |||
2285 | if (retval < 0) { | 2289 | if (retval < 0) { |
2286 | free_pending_request(req); | 2290 | free_pending_request(req); |
2287 | } else { | 2291 | } else { |