Simplify the error handling in rtw_make_wlanhdr. Exit immediately instead
of jumping to the end of the function. We don't have to do any clean-up.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221230180646.91008-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
u8 qos_option = false;
-
- int res = _SUCCESS;
__le16 *fctrl = &pwlanhdr->frame_control;
struct sta_info *psta;
if (psta->qos_option)
qos_option = true;
} else {
- res = _FAIL;
- goto exit;
+ return _FAIL;
}
if (pattrib->mdata)
}
}
}
-exit:
- return res;
+ return _SUCCESS;
}
s32 rtw_txframes_pending(struct adapter *padapter)