staging: rtl8192u: check return value of rtl8192_read_eeprom_info
The call of rtl8192_read_eeprom_info may fail, therefore its return value must be checked and propagated in the case of error Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eafe8261c1
commit
4dc2abb852
|
@ -2706,6 +2706,7 @@ static short rtl8192_get_channel_map(struct net_device *dev)
|
||||||
static short rtl8192_init(struct net_device *dev)
|
static short rtl8192_init(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct r8192_priv *priv = ieee80211_priv(dev);
|
struct r8192_priv *priv = ieee80211_priv(dev);
|
||||||
|
int err;
|
||||||
|
|
||||||
memset(&(priv->stats), 0, sizeof(struct Stats));
|
memset(&(priv->stats), 0, sizeof(struct Stats));
|
||||||
memset(priv->txqueue_to_outpipemap, 0, 9);
|
memset(priv->txqueue_to_outpipemap, 0, 9);
|
||||||
|
@ -2727,7 +2728,14 @@ static short rtl8192_init(struct net_device *dev)
|
||||||
rtl8192_init_priv_lock(priv);
|
rtl8192_init_priv_lock(priv);
|
||||||
rtl8192_init_priv_task(dev);
|
rtl8192_init_priv_task(dev);
|
||||||
rtl8192_get_eeprom_size(dev);
|
rtl8192_get_eeprom_size(dev);
|
||||||
rtl8192_read_eeprom_info(dev);
|
err = rtl8192_read_eeprom_info(dev);
|
||||||
|
if (err) {
|
||||||
|
DMESG("Reading EEPROM info failed");
|
||||||
|
kfree(priv->pFirmware);
|
||||||
|
priv->pFirmware = NULL;
|
||||||
|
free_ieee80211(dev);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
rtl8192_get_channel_map(dev);
|
rtl8192_get_channel_map(dev);
|
||||||
init_hal_dm(dev);
|
init_hal_dm(dev);
|
||||||
setup_timer(&priv->watch_dog_timer, watch_dog_timer_callback,
|
setup_timer(&priv->watch_dog_timer, watch_dog_timer_callback,
|
||||||
|
|
Loading…
Reference in New Issue