Skip to content

Commit 22e8860

Browse files
kengiterStefan-Schmidt
authored andcommitted
net: ieee802154: fix missing checks for regmap_update_bits
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 <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Signed-off-by: Stefan Schmidt <[email protected]>
1 parent 1c5c12e commit 22e8860

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ieee802154/mcr20a.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,18 +533,24 @@ mcr20a_start(struct ieee802154_hw *hw)
533533
dev_dbg(printdev(lp), "no slotted operation\n");
534534
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
535535
DAR_PHY_CTRL1_SLOTTED, 0x0);
536+
if (ret < 0)
537+
return ret;
536538

537539
/* enable irq */
538540
enable_irq(lp->spi->irq);
539541

540542
/* Unmask SEQ interrupt */
541543
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL2,
542544
DAR_PHY_CTRL2_SEQMSK, 0x0);
545+
if (ret < 0)
546+
return ret;
543547

544548
/* Start the RX sequence */
545549
dev_dbg(printdev(lp), "start the RX sequence\n");
546550
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
547551
DAR_PHY_CTRL1_XCVSEQ_MASK, MCR20A_XCVSEQ_RX);
552+
if (ret < 0)
553+
return ret;
548554

549555
return 0;
550556
}

0 commit comments

Comments
 (0)