mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
Some mt7603e chip has empty efuse data. In this case driver will crash due to dereferencing NULL pointer. The mt7603_eeprom_load will return success directly if the chip has no efuse data and dev->mt76.otp.data is left empty, i.e. NULL pointer. The mt7603_eeprom_init will then try to dereference dev->mt76.otp.data without checking its value. This patch adds a check around these codes to prevent kernel panic. Signed-off-by: Weijie Gao <[email protected]>