]> Git Repo - linux.git/commitdiff
net: ieee802154: fix missing checks for regmap_update_bits
authorKangjie Lu <[email protected]>
Sun, 24 Mar 2019 23:18:56 +0000 (18:18 -0500)
committerStefan Schmidt <[email protected]>
Wed, 24 Apr 2019 18:15:15 +0000 (20:15 +0200)
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]>
drivers/net/ieee802154/mcr20a.c

index c589f5ae75bb552f53b39eed367594bc3d420165..8bb53ec8d9cf296f4735af57d50de364ce68ec9b 100644 (file)
@@ -533,6 +533,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);
@@ -540,11 +542,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;
 }
This page took 0.060955 seconds and 4 git commands to generate.