diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/bcm203x.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 4 |
2 files changed, 3 insertions, 2 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); |
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 1994270c16e1..93ba25b7ea32 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -191,7 +191,7 @@ static int hci_uart_flush(struct hci_dev *hdev) | |||
191 | 191 | ||
192 | /* Flush any pending characters in the driver and discipline. */ | 192 | /* Flush any pending characters in the driver and discipline. */ |
193 | tty_ldisc_flush(tty); | 193 | tty_ldisc_flush(tty); |
194 | if (tty->driver->flush_buffer) | 194 | if (tty->driver && tty->driver->flush_buffer) |
195 | tty->driver->flush_buffer(tty); | 195 | tty->driver->flush_buffer(tty); |
196 | 196 | ||
197 | if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) | 197 | if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) |
@@ -290,7 +290,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) | |||
290 | if (tty->ldisc.flush_buffer) | 290 | if (tty->ldisc.flush_buffer) |
291 | tty->ldisc.flush_buffer(tty); | 291 | tty->ldisc.flush_buffer(tty); |
292 | 292 | ||
293 | if (tty->driver->flush_buffer) | 293 | if (tty->driver && tty->driver->flush_buffer) |
294 | tty->driver->flush_buffer(tty); | 294 | tty->driver->flush_buffer(tty); |
295 | 295 | ||
296 | return 0; | 296 | return 0; |