summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btrtl.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-05-24 19:11:51 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-07-14 21:34:28 -0400
commit973dd9c4db4746200f88fe46e30eada7054fdbea (patch)
tree9bd4b9d177781b1437ac88bb315426795ec35bc3 /drivers/bluetooth/btrtl.c
parent183469bccf68cb05dfb56cc47e73520217854bab (diff)
downloadlinux-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.c2
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;