Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1293785

Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning
Date 2015-12-17 12:10 +0100
Message-ID <qGEBB-70s-37@gated-at.bofh.it> (permalink)
References <qGsAq-7D6-25@gated-at.bofh.it> <qGsTL-7Lk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Put a v3 in the subject.

There are still paths where this is not freed, so we need a v4.  Take
your time, there is no rush.

>  drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> index 130c852..77eed52 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> @@ -594,12 +594,22 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
>  {
>  	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
>  	PRX_REORDER_ENTRY	pReorderEntry = NULL;
> -	struct ieee80211_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
> +	struct ieee80211_rxb **prxbIndicateArray;
>  	u8			WinSize = pHTInfo->RxReorderWinSize;
>  	u16			WinEnd = (pTS->RxIndicateSeq + WinSize -1)%4096;
>  	u8			index = 0;
>  	bool			bMatchWinStart = false, bPktInBuf = false;
>  	IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__func__,SeqNum,pTS->RxIndicateSeq,WinSize);
> +
> +	prxbIndicateArray = kmalloc(sizeof(struct ieee80211_rxb *) *
> +			REORDER_WIN_SIZE, GFP_KERNEL);
> +	if (!prxbIndicateArray) {
> +		IEEE80211_DEBUG(IEEE80211_DL_ERR,
> +				"%s(): kmalloc prxbIndicateArray error\n",
> +				__func__);

Don't print an error if kmalloc() fails.  kmalloc has its own message.

> +		return;
> +	}

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: rtl8192u: fix large frame size compiler warning Okash Khawaja <okash.khawaja@gmail.com> - 2015-12-16 23:20 +0100
  Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning Okash Khawaja <okash.khawaja@gmail.com> - 2015-12-16 23:30 +0100
  [PATCH] staging: rtl8192u: fix large frame size compiler warning Okash Khawaja <okash.khawaja@gmail.com> - 2015-12-16 23:40 +0100
    Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-17 12:10 +0100
      [PATCH v4] staging: rtl8192u: fix large frame size compiler warning Okash Khawaja <okash.khawaja@gmail.com> - 2015-12-17 21:40 +0100
        Re: [PATCH v4] staging: rtl8192u: fix large frame size compiler  warning Okash Khawaja <okash.khawaja@gmail.com> - 2015-12-22 13:50 +0100
          Re: [PATCH v4] staging: rtl8192u: fix large frame size compiler  warning Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-22 14:30 +0100

csiph-web