diff options
author | Magnus Damm <magnus@valinux.co.jp> | 2006-07-10 07:44:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:15 -0400 |
commit | 73ca66b97b73257a7d832d502c36fc19fe847809 (patch) | |
tree | d39f50b1931d67c51e56f891b785be1143599177 /drivers/bluetooth | |
parent | 454d6fbc48374be8f53b9bafaa86530cf8eb3bc1 (diff) |
[PATCH] release_firmware() fixes
Use release_firmware() to free requested resources.
According to Documentation/firmware_class/README the request_firmware()
call should be followed by a release_firmware(). Some drivers do not
however free the firmware previously allocated with request_firmware().
This patch tries to fix this by making sure that release_firmware() is used
as expected.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/bcm203x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 6f67141f4de0..13ba729cdd57 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c | |||
@@ -234,6 +234,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id | |||
234 | data->fw_data = kmalloc(firmware->size, GFP_KERNEL); | 234 | data->fw_data = kmalloc(firmware->size, GFP_KERNEL); |
235 | if (!data->fw_data) { | 235 | if (!data->fw_data) { |
236 | BT_ERR("Can't allocate memory for firmware image"); | 236 | BT_ERR("Can't allocate memory for firmware image"); |
237 | release_firmware(firmware); | ||
237 | usb_free_urb(data->urb); | 238 | usb_free_urb(data->urb); |
238 | kfree(data->buffer); | 239 | kfree(data->buffer); |
239 | kfree(data); | 240 | kfree(data); |