mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
net: ieee802154: fix missing checks for regmap_update_bits
[ Upstream commit 22e8860cf8 ]
regmap_update_bits could fail and deserves a check.
The patch adds the checks and if it fails, returns its error
code upstream.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9c045d8c97
commit
36ae546a00
|
|
@ -539,6 +539,8 @@ mcr20a_start(struct ieee802154_hw *hw)
|
|||
dev_dbg(printdev(lp), "no slotted operation\n");
|
||||
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
|
||||
DAR_PHY_CTRL1_SLOTTED, 0x0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* enable irq */
|
||||
enable_irq(lp->spi->irq);
|
||||
|
|
@ -546,11 +548,15 @@ mcr20a_start(struct ieee802154_hw *hw)
|
|||
/* Unmask SEQ interrupt */
|
||||
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL2,
|
||||
DAR_PHY_CTRL2_SEQMSK, 0x0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Start the RX sequence */
|
||||
dev_dbg(printdev(lp), "start the RX sequence\n");
|
||||
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
|
||||
DAR_PHY_CTRL1_XCVSEQ_MASK, MCR20A_XCVSEQ_RX);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user