aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ozwpan/ozpd.c
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2015-02-10 10:24:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 16:14:08 -0800
commite03b7297f8e8968e98ff9eab57e0f92e106248ad (patch)
treeca6a76e0b87317587564f173a06225ddac38b586 /drivers/staging/ozwpan/ozpd.c
parentStaging: dgnc: Fix checking return value of register_chrdev (diff)
downloadlinux-dev-e03b7297f8e8968e98ff9eab57e0f92e106248ad.tar.xz
linux-dev-e03b7297f8e8968e98ff9eab57e0f92e106248ad.zip
staging: ozwpan: Remove allocation from delaration line
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozpd.c')
-rw-r--r--drivers/staging/ozwpan/ozpd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
index 852c288aaf13..1c95d5799217 100644
--- a/drivers/staging/ozwpan/ozpd.c
+++ b/drivers/staging/ozwpan/ozpd.c
@@ -102,8 +102,9 @@ void oz_pd_put(struct oz_pd *pd)
*/
struct oz_pd *oz_pd_alloc(const u8 *mac_addr)
{
- struct oz_pd *pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC);
+ struct oz_pd *pd;
+ pd = kzalloc(sizeof(struct oz_pd), GFP_ATOMIC);
if (pd) {
int i;
@@ -652,8 +653,9 @@ static struct oz_isoc_stream *pd_stream_find(struct oz_pd *pd, u8 ep_num)
*/
int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num)
{
- struct oz_isoc_stream *st =
- kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC);
+ struct oz_isoc_stream *st;
+
+ st = kzalloc(sizeof(struct oz_isoc_stream), GFP_ATOMIC);
if (!st)
return -ENOMEM;
st->ep_num = ep_num;