diff options
Diffstat (limited to 'drivers/staging/wfx/hif_tx.c')
-rw-r--r-- | drivers/staging/wfx/hif_tx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 8a34a52dd5b9..d8e159670eae 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -366,6 +366,9 @@ int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, struct hif_req_edca_queue_params *body = wfx_alloc_hif(sizeof(*body), &hif); + if (!body) + return -ENOMEM; + WARN_ON(arg->aifs > 255); body->aifsn = arg->aifs; body->cw_min = cpu_to_le16(arg->cw_min); @@ -390,6 +393,9 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) struct hif_msg *hif; struct hif_req_set_pm_mode *body = wfx_alloc_hif(sizeof(*body), &hif); + if (!body) + return -ENOMEM; + if (ps) { body->pm_mode.enter_psm = 1; // Firmware does not support more than 128ms |