aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-29 08:51:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 15:16:54 -0500
commita02308e931ad0bba19803779bec491c4b2d67b47 (patch)
treea4b4f475811c87b5e0b0e4b5dff36777b6c085c9 /drivers/net/wireless/rt2x00/rt2800usb.c
parente1b97c9bc5902ec8b36247bcb7c3552895611485 (diff)
rt2x00: rt2800: convert read_eeprom functions to return an int value
Both the rtt2x00usb_eeprom_read and the ioremap functions are allowed to fail, however their return values are not checked in the read_eeprom functions in the rt2800{pci,usb} drivers. The patch adds the missing checks, and converts all read_eeprom functions to return an int value, so the error values can be propagated up to the 'rt2800_validate_eeprom' function. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 5c149b58ab46..4721cada1591 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -735,13 +735,17 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
735/* 735/*
736 * Device probe functions. 736 * Device probe functions.
737 */ 737 */
738static void rt2800usb_read_eeprom(struct rt2x00_dev *rt2x00dev) 738static int rt2800usb_read_eeprom(struct rt2x00_dev *rt2x00dev)
739{ 739{
740 int retval;
741
740 if (rt2800_efuse_detect(rt2x00dev)) 742 if (rt2800_efuse_detect(rt2x00dev))
741 rt2800_read_eeprom_efuse(rt2x00dev); 743 retval = rt2800_read_eeprom_efuse(rt2x00dev);
742 else 744 else
743 rt2x00usb_eeprom_read(rt2x00dev, rt2x00dev->eeprom, 745 retval = rt2x00usb_eeprom_read(rt2x00dev, rt2x00dev->eeprom,
744 EEPROM_SIZE); 746 EEPROM_SIZE);
747
748 return retval;
745} 749}
746 750
747static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev) 751static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)