summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-05-27 19:34:25 +0200
committerKalle Valo <kvalo@kernel.org>2024-06-01 13:08:57 +0300
commitdcb77f854ae086bf32596fae02c88665393a13e8 (patch)
treefb7c1c02c9ac215a78a5257c6a84d4563d0f7029 /drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
parent8526f8c877baf3f9e678b31fd7d1066b776775cc (diff)
wifi: brcm80211: 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. At the same time remove some redundant NULL initializations. Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Erick Archer <erick.archer@outlook.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/AS8PR02MB7237FF1C2E880D1231684D708BF02@AS8PR02MB7237.eurprd02.prod.outlook.com
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
index e472591f321b..d0faba240561 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -4968,11 +4968,11 @@ bool wlc_phy_attach_lcnphy(struct brcms_phy *pi)
{
struct brcms_phy_lcnphy *pi_lcn;
- pi->u.pi_lcnphy = kzalloc(sizeof(struct brcms_phy_lcnphy), GFP_ATOMIC);
- if (pi->u.pi_lcnphy == NULL)
+ pi_lcn = kzalloc(sizeof(*pi_lcn), GFP_ATOMIC);
+ if (!pi_lcn)
return false;
- pi_lcn = pi->u.pi_lcnphy;
+ pi->u.pi_lcnphy = pi_lcn;
if (0 == (pi->sh->boardflags & BFL_NOPA)) {
pi->hwpwrctrl = true;