Skip to content

Commit

Permalink
brcm80211: smac: precendence bug in wlc_phy_attach()
Browse files Browse the repository at this point in the history
Negate has higher precendence than compare and since neither zero nor
one are equal to four or eight the original condition is always false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Dec 15, 2011
1 parent 29942bc commit aa1f2f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core,
pi->pubpi.phy_corenum = PHY_CORE_NUM_2;
pi->pubpi.ana_rev = (phyversion & PV_AV_MASK) >> PV_AV_SHIFT;

if (!pi->pubpi.phy_type == PHY_TYPE_N &&
!pi->pubpi.phy_type == PHY_TYPE_LCN)
if (pi->pubpi.phy_type != PHY_TYPE_N &&
pi->pubpi.phy_type != PHY_TYPE_LCN)
goto err;

if (bandtype == BRCM_BAND_5G) {
Expand Down

0 comments on commit aa1f2f0

Please sign in to comment.