From: Andi Kleen Date: Fri, 16 Mar 2012 19:01:02 +0000 (-0700) Subject: usb: gadget: f_fs: Remove lock is held before freeing checks X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=647d558023e3868725b381b4dccbbeae3448fc28;p=linux-beck.git usb: gadget: f_fs: Remove lock is held before freeing checks lock debugging already supports this, no need to do it explicitely. Cc: balbi@ti.com Cc: gregkh@linuxfoundation.org Signed-off-by: Andi Kleen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 7e2216f1bbe6..7f445ec723bc 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -1258,9 +1258,7 @@ static void ffs_data_put(struct ffs_data *ffs) if (unlikely(atomic_dec_and_test(&ffs->ref))) { pr_info("%s(): freeing\n", __func__); ffs_data_clear(ffs); - BUG_ON(mutex_is_locked(&ffs->mutex) || - spin_is_locked(&ffs->ev.waitq.lock) || - waitqueue_active(&ffs->ev.waitq) || + BUG_ON(waitqueue_active(&ffs->ev.waitq) || waitqueue_active(&ffs->ep0req_completion.wait)); kfree(ffs); }