Skip to content

Commit 8fd4bc8

Browse files
Colin Ian KingStefan Schmidt
authored andcommitted
ieee802154: remove unused variable 'val'
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 <[email protected]> Signed-off-by: Stefan Schmidt <[email protected]>
1 parent 23e19fd commit 8fd4bc8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ieee802154/mcr20a.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,13 +723,11 @@ mcr20a_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
723723
struct mcr20a_local *lp = hw->priv;
724724
int ret;
725725
u8 rx_frame_filter_reg = 0x0;
726-
u8 val;
727726

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

730729
if (on) {
731730
/* All frame types accepted*/
732-
val |= DAR_PHY_CTRL4_PROMISCUOUS;
733731
rx_frame_filter_reg &= ~(IAR_RX_FRAME_FLT_FRM_VER);
734732
rx_frame_filter_reg |= (IAR_RX_FRAME_FLT_ACK_FT |
735733
IAR_RX_FRAME_FLT_NS_FT);

0 commit comments

Comments
 (0)