diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-05-24 19:11:51 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-07-14 21:34:28 -0400 |
commit | 973dd9c4db4746200f88fe46e30eada7054fdbea (patch) | |
tree | 9bd4b9d177781b1437ac88bb315426795ec35bc3 /drivers/bluetooth/btrtl.c | |
parent | 183469bccf68cb05dfb56cc47e73520217854bab (diff) | |
download | linux-973dd9c4db4746200f88fe46e30eada7054fdbea.tar.gz linux-973dd9c4db4746200f88fe46e30eada7054fdbea.tar.bz2 linux-973dd9c4db4746200f88fe46e30eada7054fdbea.zip |
Bluetooth: Use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type)
due to the type of the variable can change and one needs not
change the former (unlike the latter). This patch has no effect
on runtime behavior.
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth/btrtl.c')
-rw-r--r-- | drivers/bluetooth/btrtl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 4f1e37b4f780..f2f37143c454 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -811,7 +811,7 @@ static int rtl_download_firmware(struct hci_dev *hdev, struct sk_buff *skb; struct hci_rp_read_local_version *rp; - dl_cmd = kmalloc(sizeof(struct rtl_download_cmd), GFP_KERNEL); + dl_cmd = kmalloc(sizeof(*dl_cmd), GFP_KERNEL); if (!dl_cmd) return -ENOMEM; |