From: Simon Horman <horms@verge.net.au>
To: Peter Huewe <PeterHuewe@gmx.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
David Binderman <dcb314@hotmail.com>,
D Pranith Kumar <bobby.prani@gmail.com>,
Alexander Beregalov <a.beregalov@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging/otus: Add null check and fix coding style issue
Date: Tue, 27 Apr 2010 08:16:19 +0000 [thread overview]
Message-ID: <20100427081619.GJ3247@verge.net.au> (raw)
In-Reply-To: <201004270034.49340.PeterHuewe@gmx.de>
On Tue, Apr 27, 2010 at 12:34:49AM +0200, Peter Huewe wrote:
> From: Peter Huewe <peterhuewe@gmx.de>
>
> This patch removes mixing of declarations and code and adds a null-test
> after a kmalloc.
>
> Patch against linux-next as of 20100427
>
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Simon Horman <horms@verge.net.au>
> ---
> drivers/staging/otus/ioctl.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
> index 84be4b2..cface46 100644
> --- a/drivers/staging/otus/ioctl.c
> +++ b/drivers/staging/otus/ioctl.c
> @@ -867,6 +867,7 @@ int usbdrvwext_giwscan(struct net_device *dev,
> char *current_ev = extra;
> char *end_buf;
> int i;
> + struct zsBssListV1 *pBssList;
> /* BssList = wd->sta.pBssList; */
> /* zmw_get_wlan_dev(dev); */
>
> @@ -874,8 +875,10 @@ int usbdrvwext_giwscan(struct net_device *dev,
> return 0;
>
> /* struct zsBssList BssList; */
> - struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1),
> - GFP_KERNEL);
> + pBssList = kmalloc(sizeof(struct zsBssListV1), GFP_KERNEL);
> + if (pBssList = NULL)
> + return -ENOMEM;
> +
> if (data->length = 0)
> end_buf = extra + IW_SCAN_MAX_DATA;
> else
> --
> 1.6.4.4
prev parent reply other threads:[~2010-04-27 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 22:34 [PATCH] staging/otus: Add null check and fix coding style issue Peter Huewe
2010-04-27 8:16 ` Simon Horman [this message]
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=20100427081619.GJ3247@verge.net.au \
--to=horms@verge.net.au \
--cc=PeterHuewe@gmx.de \
--cc=a.beregalov@gmail.com \
--cc=bobby.prani@gmail.com \
--cc=dcb314@hotmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox