qcacld-3.0: Fix static analysis issues in wlan_hdd_lro.c

Fix NULL dereference a pointer returned from call to function
'cds_get_context'.

Change-Id: I4c09309b5813f105ccf1c836b81a92522d81df75
CRs-Fixed: 2162256
This commit is contained in:
Yun Park 2018-01-09 14:38:45 -08:00 • committed by snandini
commit f2e213b322

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -122,6 +122,7 @@ static qdf_lro_ctx_t wlan_hdd_get_lro_ctx(struct sk_buff *skb)
(struct hif_opaque_softc *)cds_get_context(QDF_MODULE_ID_HIF);
if (hif_hdl == NULL) {
hdd_err("hif_hdl is NULL");
return NULL;
}
return hif_get_lro_info(QDF_NBUF_CB_RX_CTX_ID(skb), hif_hdl);
@ -255,6 +256,11 @@ void hdd_disable_lro_in_concurrency(bool disable)
{
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (hdd_ctx == NULL) {
hdd_err("hdd_ctx is NULL");
return;
}
if (disable) {
if (hdd_ctx->en_tcp_delack_no_lro) {
struct wlan_rx_tp_data rx_tp_data;