Skip to content

Commit

Permalink
at86rf230: init xtal_trim with zero
Browse files Browse the repository at this point in the history
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 <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Mar 14, 2015
1 parent 3f3c4bb commit e372174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,7 @@ static int at86rf230_probe(struct spi_device *spi)
struct at86rf230_local *lp;
unsigned int status;
int rc, irq_type, rstn, slp_tr;
u8 xtal_trim;
u8 xtal_trim = 0;

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

0 comments on commit e372174

Please sign in to comment.