summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-02-07 13:33:29 +0000
committerKalle Valo <kvalo@kernel.org>2022-02-10 10:46:48 +0200
commit2fd6d2ef68607b9da952796c7aab352791daec66 (patch)
tree9c9d2ca522677bc5d8b9d4ebfe7a7ac470757a52 /drivers/net
parentf3c04fffe2717878d032a275f16d1e397402da10 (diff)
brcmfmac: of: remove redundant variable len
The variable len is being assigned bit is never used. The variable and the strlen call are redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220207133329.336664-1-colin.i.king@gmail.com
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index 5708de1d9f26..8623bde5eb70 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -71,14 +71,13 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
/* Set board-type to the first string of the machine compatible prop */
root = of_find_node_by_path("/");
if (root) {
- int i, len;
+ int i;
char *board_type;
const char *tmp;
of_property_read_string_index(root, "compatible", 0, &tmp);
/* get rid of '/' in the compatible string to be able to find the FW */
- len = strlen(tmp) + 1;
board_type = devm_kstrdup(dev, tmp, GFP_KERNEL);
if (!board_type) {
of_node_put(root);