Commit 2cc6d079 authored by Hans de Goede's avatar Hans de Goede Committed by Marcel Holtmann

Bluetooth: btbcm: btbcm_initialize(): Initialize hw_name to "BCM"

Initialize hw_name to "BCM", this avoids the need for a number of NULL
checks on hw_name later.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 59ce5699
...@@ -350,7 +350,7 @@ int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len, ...@@ -350,7 +350,7 @@ int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len,
bool reinit) bool reinit)
{ {
u16 subver, rev, pid, vid; u16 subver, rev, pid, vid;
const char *hw_name = NULL; const char *hw_name = "BCM";
struct sk_buff *skb; struct sk_buff *skb;
struct hci_rp_read_local_version *ver; struct hci_rp_read_local_version *ver;
const struct bcm_subver_table *bcm_subver_table; const struct bcm_subver_table *bcm_subver_table;
...@@ -403,14 +403,13 @@ int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len, ...@@ -403,14 +403,13 @@ int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len,
kfree_skb(skb); kfree_skb(skb);
snprintf(fw_name, len, "brcm/%s-%4.4x-%4.4x.hcd", snprintf(fw_name, len, "brcm/%s-%4.4x-%4.4x.hcd",
hw_name ? : "BCM", vid, pid); hw_name, vid, pid);
} else { } else {
snprintf(fw_name, len, "brcm/%s.hcd", snprintf(fw_name, len, "brcm/%s.hcd", hw_name);
hw_name ? : "BCM");
} }
bt_dev_info(hdev, "%s (%3.3u.%3.3u.%3.3u) build %4.4u", bt_dev_info(hdev, "%s (%3.3u.%3.3u.%3.3u) build %4.4u",
hw_name ? : "BCM", (subver & 0xe000) >> 13, hw_name, (subver & 0xe000) >> 13,
(subver & 0x1f00) >> 8, (subver & 0x00ff), rev & 0x0fff); (subver & 0x1f00) >> 8, (subver & 0x00ff), rev & 0x0fff);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment