projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e746094
)
qca_spi: Add check for kthread_stop
author
Stefan Wahren
<wahrenst@gmx.net>
Sun, 28 Jan 2024 20:10:45 +0000
(21:10 +0100)
committer
David S. Miller
<davem@davemloft.net>
Wed, 31 Jan 2024 13:38:50 +0000
(13:38 +0000)
We better not rely on that spi_thread points to a running
thread. So add an check for this.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
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
5f3c11f
..
77bab8b
100644
(file)
--- a/
drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/
drivers/net/ethernet/qualcomm/qca_spi.c
@@
-730,8
+730,10
@@
qcaspi_netdev_close(struct net_device *dev)
qcaspi_write_register(qca, SPI_REG_INTR_ENABLE, 0, wr_verify);
free_irq(qca->spi_dev->irq, qca);
- kthread_stop(qca->spi_thread);
- qca->spi_thread = NULL;
+ if (qca->spi_thread) {
+ kthread_stop(qca->spi_thread);
+ qca->spi_thread = NULL;
+ }
qcaspi_flush_tx_ring(qca);
return 0;