at86rf230: fix at86rf230_read_subreg succeed handling
Subsystems (2)
Alexander Aring
maintainerPATCH 1/1 at86rf230: fix at86rf230_read_subreg succeed handling
This patch fix an issue when at86rf230_read_subreg was successful. The function at86rf230_read_subreg will directly call regmap_read which returns zero on successful. Nobody figured out issues yet because it was only necessary to evaluate dvdd state while probing. This could make trouble because the stack variable could have an random value.
The function is also used by reset the irq line before requesting irq, but the value isn't evaluated afterwards.
--- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/at86rf230.c +1 -1
@@ -325,7 +325,7 @@ at86rf230_read_subreg(struct at86rf230_local *lp,int rc; rc =__at86rf230_read (lp, addr, data); -if (rc >0 ) +if (!rc) *data = (*data & mask) >> shift;return rc;
Signature · 1 line
2.3.2
Hi Alex,
Quoted 6 lines
This patch fix an issue when
at86rf230_read_subregwas successful. The functionat86rf230_read_subregwill directly callregmap_readwhich returns zero on successful. Nobody figured out issues yet because it was only necessary to evaluate dvdd state while probing. This could make trouble because the stack variable could have an random value.
Quoted 7 lines
The function is also used by reset the irq line before requesting irq, but the value isn't evaluated afterwards.
Signed-off-by Alexander Aring <[email protected]>---
drivers/net/ieee802154/at86rf230.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel