spi_ks8995: regs_size incorrect for some devices
authorBlomme, Maarten <Maarten.Blomme@flir.com>
Thu, 2 Mar 2017 12:08:49 +0000 (13:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Mar 2017 21:33:24 +0000 (13:33 -0800)
Signed-off-by: Maarten Blomme <Maarten.Blomme@flir.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/spi_ks8995.c

index aa7209d794f3987c6776014b2e3aff3db602644c..1e2d4f1179da31ed1e458af5e29cc77314f875ad 100644 (file)
@@ -491,8 +491,8 @@ static int ks8995_probe(struct spi_device *spi)
        if (err)
                return err;
 
-       ks->regs_attr.size = ks->chip->regs_size;
        memcpy(&ks->regs_attr, &ks8995_registers_attr, sizeof(ks->regs_attr));
+       ks->regs_attr.size = ks->chip->regs_size;
 
        err = ks8995_reset(ks);
        if (err)