Skip to content

Commit e372174

Browse files
alexaringholtmann
authored andcommitted
at86rf230: init xtal_trim with zero
This patch initialize xtal_trim value to zero. The xtal_trim property is an optional device tree value. Currently if no xtal_trim property is given the xtal_trim value can be contain random data, because it's a stack variable. This patch init the xtal_trim value to zero which is also the default value after reset for at86rf230 transceivers. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 3f3c4bb commit e372174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ieee802154/at86rf230.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ static int at86rf230_probe(struct spi_device *spi)
15721572
struct at86rf230_local *lp;
15731573
unsigned int status;
15741574
int rc, irq_type, rstn, slp_tr;
1575-
u8 xtal_trim;
1575+
u8 xtal_trim = 0;
15761576

15771577
if (!spi->irq) {
15781578
dev_err(&spi->dev, "no IRQ specified\n");

0 commit comments

Comments
 (0)