Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a94da897 authored by Milan Svoboda's avatar Milan Svoboda Committed by Greg Kroah-Hartman
Browse files

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: default avatarMilan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e22fc27c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);
}