From 5e738fc23f1519c718b2fe2fcdb708c7d848e103 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 9 Jan 2010 17:01:33 +0000 Subject: [PATCH] --- yaml --- r: 186640 b: refs/heads/master c: 75b16013e29f6058e5bd648e6f4a9c03d262cf4f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/iio/industrialio-core.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 8dba4cb6f2d1..4538f9047095 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75c8075394906b4bda4b056328bd9b401277d9b8 +refs/heads/master: 75b16013e29f6058e5bd648e6f4a9c03d262cf4f diff --git a/trunk/drivers/staging/iio/industrialio-core.c b/trunk/drivers/staging/iio/industrialio-core.c index 87799b2a9262..4ff683a3df31 100644 --- a/trunk/drivers/staging/iio/industrialio-core.c +++ b/trunk/drivers/staging/iio/industrialio-core.c @@ -292,16 +292,16 @@ ssize_t iio_event_chrdev_read(struct file *filep, mutex_unlock(&ev_int->event_list_lock); /* * Possible concurency issue if an update of this event is on its way - * through. May lead to new even being removed whilst the reported event - * was the unescalated event. In typical use case this is not a problem - * as userspace will say read half the buffer due to a 50% full event - * which would make the correct 100% full incorrect anyway. + * through. May lead to new event being removed whilst the reported + * event was the unescalated event. In typical use case this is not a + * problem as userspace will say read half the buffer due to a 50% + * full event which would make the correct 100% full incorrect anyway. */ - spin_lock(&el->shared_pointer->lock); - if (el->shared_pointer) + if (el->shared_pointer) { + spin_lock(&el->shared_pointer->lock); (el->shared_pointer->ev_p) = NULL; - spin_unlock(&el->shared_pointer->lock); - + spin_unlock(&el->shared_pointer->lock); + } kfree(el); return len;