[ath5k] Avoid returning uninitialised data on EEPROM read errors

Originally-implemented-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/378/head
Michael Brown 2021-06-04 14:16:44 +01:00
parent f3f568e382
commit 065dce8d59
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ static int ath5k_hw_eeprom_read(struct ath5k_hw *ah, u32 offset, u16 *data)
{
u32 status, timeout;
/* Avoid returning uninitialised data on error */
*data = 0xffff;
/*
* Initialize EEPROM access
*/