diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-29 17:04:05 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-09-15 20:23:46 +0200 |
commit | 092e77d94847c7d8530e160106442d97404c4513 (patch) | |
tree | a2e9d3d03eb58e274bad95620c68c677f7fa57fc /package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch | |
parent | c1678f1fa0bfa3c53c706fad0897f9a0aec8dab2 (diff) | |
download | upstream-092e77d94847c7d8530e160106442d97404c4513.tar.gz upstream-092e77d94847c7d8530e160106442d97404c4513.tar.bz2 upstream-092e77d94847c7d8530e160106442d97404c4513.zip |
rtl8xxxu: add support for rtl8188eu
Patches by Jes Sorensen:
https://git.kernel.org/cgit/linux/kernel/git/jes/linux.git/
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch')
-rw-r--r-- | package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch b/package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch new file mode 100644 index 0000000000..5f6b698dc6 --- /dev/null +++ b/package/kernel/mac80211/patches/651-0003-rtl8xxxu-Fix-error-handling-if-rtl8xxxu_init_device-.patch @@ -0,0 +1,66 @@ +From 70a3605d6d1922411b8a78499d58f140565353f7 Mon Sep 17 00:00:00 2001 +From: Jes Sorensen <Jes.Sorensen@redhat.com> +Date: Wed, 29 Jun 2016 14:42:18 -0400 +Subject: [PATCH] rtl8xxxu: Fix error handling if rtl8xxxu_init_device() fails + +For some reason we lost the code bailing if rtl8xxxu_init_device() +returned an error. + +This catches the error and also cleans up the error handling. + +Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> +--- + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -5947,7 +5947,7 @@ static int rtl8xxxu_probe(struct usb_int + struct ieee80211_hw *hw; + struct usb_device *udev; + struct ieee80211_supported_band *sband; +- int ret = 0; ++ int ret; + int untested = 1; + + udev = usb_get_dev(interface_to_usbdev(interface)); +@@ -5995,6 +5995,7 @@ static int rtl8xxxu_probe(struct usb_int + hw = ieee80211_alloc_hw(sizeof(struct rtl8xxxu_priv), &rtl8xxxu_ops); + if (!hw) { + ret = -ENOMEM; ++ priv = NULL; + goto exit; + } + +@@ -6043,6 +6044,8 @@ static int rtl8xxxu_probe(struct usb_int + } + + ret = rtl8xxxu_init_device(hw); ++ if (ret) ++ goto exit; + + hw->wiphy->max_scan_ssids = 1; + hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; +@@ -6093,9 +6096,20 @@ static int rtl8xxxu_probe(struct usb_int + goto exit; + } + ++ return 0; ++ + exit: +- if (ret < 0) +- usb_put_dev(udev); ++ usb_set_intfdata(interface, NULL); ++ ++ if (priv) { ++ kfree(priv->fw_data); ++ mutex_destroy(&priv->usb_buf_mutex); ++ mutex_destroy(&priv->h2c_mutex); ++ } ++ usb_put_dev(udev); ++ ++ ieee80211_free_hw(hw); ++ + return ret; + } + |