From: Jussi Kivilinna Date: Mon, 31 Jan 2011 18:47:17 +0000 (+0200) Subject: zd1211rw: cancel process_intr work on zd_chip_disable_int() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d741900d404b3a34bf478673f76ee9f16dad3f90;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git zd1211rw: cancel process_intr work on zd_chip_disable_int() OOPS if worker is running and disconnect() is called (triggered by unpluging device). Much harder to trigger at this stage but later when we have AP beacon work in process_intr it happens very easy. Signed-off-by: Jussi Kivilinna Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 6a9b66051cf7..b644ced848e7 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c @@ -1407,6 +1407,9 @@ void zd_chip_disable_int(struct zd_chip *chip) mutex_lock(&chip->mutex); zd_usb_disable_int(&chip->usb); mutex_unlock(&chip->mutex); + + /* cancel pending interrupt work */ + cancel_work_sync(&zd_chip_to_mac(chip)->process_intr); } int zd_chip_enable_rxtx(struct zd_chip *chip)