brcmfmac: of: remove redundant variable len
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +1 -2
@@ -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);
Signature · 1 line
2.34.1
Quoted 4 lines · Colin Ian King
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 <[email protected]>
Patch applied to wireless-next.git, thanks.
2fd6d2ef6860 brcmfmac: of: remove redundant variable len
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches