diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-11-05 14:50:32 +0100 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-11-20 12:28:56 +0200 |
commit | 5974fbb5e10b018fdbe3c3b81cb4cc54e1105ab9 (patch) | |
tree | f285094f89a4be3d221e7c9a245ad50ad99f59af /drivers/net/wireless/intel/iwlwifi/dvm | |
parent | b646a883ad74387ec17266e94720c46d6aaa1be2 (diff) | |
download | lwn-5974fbb5e10b018fdbe3c3b81cb4cc54e1105ab9.tar.gz lwn-5974fbb5e10b018fdbe3c3b81cb4cc54e1105ab9.zip |
iwlwifi: check kasprintf() return value
kasprintf() can fail, we should check the return value.
Fixes: 5ed540aecc2a ("iwlwifi: use mac80211 throughput trigger")
Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/dvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/dvm/led.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/led.c b/drivers/net/wireless/intel/iwlwifi/dvm/led.c index dd387aba3317..e8a4d604b910 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/led.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/led.c @@ -171,6 +171,9 @@ void iwl_leds_init(struct iwl_priv *priv) priv->led.name = kasprintf(GFP_KERNEL, "%s-led", wiphy_name(priv->hw->wiphy)); + if (!priv->led.name) + return; + priv->led.brightness_set = iwl_led_brightness_set; priv->led.blink_set = iwl_led_blink_set; priv->led.max_brightness = 1; |