• Jens Axboe's avatar
    iwlwifi: fix kernel crash when unregistering thermal zone · 92549cdc
    Jens Axboe authored
    A recent firmware change seems to have enabled thermal zones on the
    iwlwifi driver. Unfortunately, my device fails when registering the
    thermal zone. This doesn't stop the driver from attempting to unregister
    the thermal zone at unload time, triggering a NULL pointer deference in
    strlen() off the thermal_zone_device_unregister() path.
    
    Don't unregister if name is NULL, for that case we failed registering.
    Do the same for the cooling zone.
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    92549cdc
tt.c 22.9 KB