From a94da8971e836f32315f8832b0bf3e88bee9efae Mon Sep 17 00:00:00 2001 From: Milan Svoboda Date: Tue, 8 Aug 2006 22:14:43 -0700 Subject: [PATCH] USB gadget: gadgetfs dont try to lock before free I spotted this during my tests with -rt on arm. The -rt patch contains some better tools to diagnose problems with locks and some other things... Original code tries to take semaphore in BUG_ON and then free the memory with this semaphore. Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index ed9b404e5f..a38b6af2c3 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -223,7 +223,6 @@ static void put_ep (struct ep_data *data) /* needs no more cleanup */ BUG_ON (!list_empty (&data->epfiles)); BUG_ON (waitqueue_active (&data->wait)); - BUG_ON (down_trylock (&data->lock) != 0); kfree (data); } -- 2.39.5