Skip to content

Commit

Permalink
brcmfmac: of: remove redundant variable len
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Colin Ian King authored and Kalle Valo committed Feb 10, 2022
1 parent f3c04ff commit 2fd6d2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2fd6d2e

Please sign in to comment.