mac80211: rt2x00: fix crash on release_firmware
authorStanislaw Gruszka <sgruszka@redhat.com>
Sun, 24 Feb 2019 09:23:18 +0000 (10:23 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 26 Feb 2019 21:57:32 +0000 (22:57 +0100)
commit426ffc563a94ca12531ff8a2df598185ba88487e
treecaf833d18b70f6c4b43f4572b4aea210c6872a21
parent0f89c17b578faea7374373eaf63ff91fafc1c4c6
mac80211: rt2x00: fix crash on release_firmware

Fix crash due to passing invalid r2x00dev->eeprom_file pointer to
release_firmware(). Since we copy eeprom data with EEPROM_SIZE
in rt2800_read_eeprom() we can use eeprom_file->size as marker
if the file was crated by request_firmware().

Acked-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch