Skip to content

Commit

Permalink
ieee802154: remove unused variable 'val'
Browse files Browse the repository at this point in the history
Variable 'val' is not being initialized and is later being logically
or'd with DAR_PHY_CTRL4_PROMISCUOUS. Considering this variable is never
being read anyway we may as well remove val altogether.

Cleans up error detected by cppcheck:
drivers/net/ieee802154/mcr20a.c:732: (error) Uninitialized variable: val

Fixes: 8c6ad9c ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
  • Loading branch information
Colin Ian King authored and Stefan Schmidt committed Mar 2, 2018
1 parent 23e19fd commit 8fd4bc8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ieee802154/mcr20a.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,11 @@ mcr20a_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
struct mcr20a_local *lp = hw->priv;
int ret;
u8 rx_frame_filter_reg = 0x0;
u8 val;

dev_dbg(printdev(lp), "%s(%d)\n", __func__, on);

if (on) {
/* All frame types accepted*/
val |= DAR_PHY_CTRL4_PROMISCUOUS;
rx_frame_filter_reg &= ~(IAR_RX_FRAME_FLT_FRM_VER);
rx_frame_filter_reg |= (IAR_RX_FRAME_FLT_ACK_FT |
IAR_RX_FRAME_FLT_NS_FT);
Expand Down

0 comments on commit 8fd4bc8

Please sign in to comment.