drivers/wireless/ieee80211/bcmf_bdc.c: Trivial check for NULL pointer.

This commit is contained in:
Gregory Nutt 2018-08-22 17:02:23 -06:00
parent 1d55bfaef8
commit dbe9b7ffb7

View File

@ -260,6 +260,13 @@ struct bcmf_frame_s *bcmf_bdc_rx_frame(FAR struct bcmf_dev_s *priv)
struct bcmf_frame_s *frame = priv->bus->rxframe(priv);
struct bcmf_bdc_header *header;
/* Very that there is an Rx frame */
if (frame == NULL)
{
return NULL;
}
/* Process bdc header */
frame_len = frame->len - (unsigned int)(frame->data - frame->base);