projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48de7c0
)
net: qca_spi: Avoid reading signature three times in a row
author
Stefan Wahren
<stefan.wahren@i2se.com>
Sat, 8 May 2021 12:36:33 +0000
(14:36 +0200)
committer
David S. Miller
<davem@davemloft.net>
Mon, 10 May 2021 21:29:18 +0000
(14:29 -0700)
There is no need to read the signature three times. So bail out
in case the second check failed.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/qca_spi.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/qualcomm/qca_spi.c
b/drivers/net/ethernet/qualcomm/qca_spi.c
index ab9b02574a152f28bb14b059ca32a15c4a2ab746..3e2a54c2fc830e2af932c2203cac3f2f252914d9 100644
(file)
--- a/
drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/
drivers/net/ethernet/qualcomm/qca_spi.c
@@
-506,6
+506,7
@@
qcaspi_qca7k_sync(struct qcaspi *qca, int event)
if (signature != QCASPI_GOOD_SIGNATURE) {
qca->sync = QCASPI_SYNC_UNKNOWN;
netdev_dbg(qca->net_dev, "sync: got CPU on, but signature was invalid, restart\n");
+ return;
} else {
/* ensure that the WRBUF is empty */
qcaspi_read_register(qca, SPI_REG_WRBUF_SPC_AVA,