qcacmn: Add NULL check for HIF device before dereferencing
Propagation from qcacld-2.0 to qcacmn. Add NULL check for HIF device structure in hif_enable_func before dereferencing it. Change-Id: I535d5138c2247b4b9acdf63211f30a57a1d3116f CRs-Fixed: 1055684
This commit is contained in:

committed by
qcabuildsw

parent
8d0cdea5b4
commit
df9ac5731e
@@ -2013,6 +2013,11 @@ static QDF_STATUS hif_enable_func(struct hif_sdio_dev *device,
|
||||
|
||||
device = get_hif_device(func);
|
||||
|
||||
if (!device) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HIF device is NULL\n"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (device->is_disabled) {
|
||||
int setAsyncIRQ = 0;
|
||||
__u16 manufacturer_id =
|
||||
|
Reference in New Issue
Block a user