All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Okash Khawaja <okash.khawaja@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: fix large frame size compiler warning
Date: Thu, 17 Dec 2015 14:04:35 +0300	[thread overview]
Message-ID: <20151217110435.GG5284@mwanda> (raw)
In-Reply-To: <20151216211534.GA13478@bytefire-computer>

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


  reply	other threads:[~2015-12-17 11:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 20:55 [PATCH] staging: rtl8192u: fix large frame size compiler warning Okash Khawaja
2015-12-16 21:02 ` Okash Khawaja
2015-12-16 21:15 ` Okash Khawaja
2015-12-17 11:04   ` Dan Carpenter [this message]
2015-12-17 20:30     ` [PATCH v4] " Okash Khawaja
2015-12-22 12:45       ` Okash Khawaja
2015-12-22 13:24         ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151217110435.GG5284@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okash.khawaja@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.