aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-08-06 12:36:47 +0200
committerMarcel Holtmann <marcel@holtmann.org>2005-08-06 12:36:47 +0200
commite9a3e671c09d419f29710d8620ed916d3bf7d7ab (patch)
tree6ce4e75810fc0724d05c305fc6b517aba23598c0
parentdcc365d8f28d6a2332fa37e64d669858a8d017e8 (diff)
downloadkernel_samsung_smdk4412-e9a3e671c09d419f29710d8620ed916d3bf7d7ab.zip
kernel_samsung_smdk4412-e9a3e671c09d419f29710d8620ed916d3bf7d7ab.tar.gz
kernel_samsung_smdk4412-e9a3e671c09d419f29710d8620ed916d3bf7d7ab.tar.bz2
[Bluetooth] Kill redundant NULL checks before kfree()
There's no need to check for NULL before calling kfree() on a pointer. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--drivers/bluetooth/bpa10x.c7
-rw-r--r--drivers/bluetooth/hci_usb.c6
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 2771c86..f696da6 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -367,11 +367,8 @@ static inline void bpa10x_free_urb(struct urb *urb)
if (!urb)
return;
- if (urb->setup_packet)
- kfree(urb->setup_packet);
-
- if (urb->transfer_buffer)
- kfree(urb->transfer_buffer);
+ kfree(urb->setup_packet);
+ kfree(urb->transfer_buffer);
usb_free_urb(urb);
}
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index e8bad41..319871ca 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -390,10 +390,8 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb)
urb = &_urb->urb;
BT_DBG("%s freeing _urb %p type %d urb %p",
husb->hdev->name, _urb, _urb->type, urb);
- if (urb->setup_packet)
- kfree(urb->setup_packet);
- if (urb->transfer_buffer)
- kfree(urb->transfer_buffer);
+ kfree(urb->setup_packet);
+ kfree(urb->transfer_buffer);
_urb_free(_urb);
}