From: Loic Pefferkorn <loic@loicp.eu>
To: gregkh@linuxfoundation.org, alan@linux.intel.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/6] staging: goldfish: avoid multiple assignments
Date: Wed, 3 Sep 2014 13:13:47 +0200 [thread overview]
Message-ID: <1409742827-6048-7-git-send-email-loic@loicp.eu> (raw)
In-Reply-To: <1409742827-6048-1-git-send-email-loic@loicp.eu>
Coding style: avoid multiple assignments
Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
---
drivers/staging/goldfish/goldfish_nand.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index f177911..17cd439 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -328,9 +328,10 @@ static int goldfish_nand_init_device(struct platform_device *pdev,
mtd->priv = nand;
- mtd->name = name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL);
+ name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL);
if (name == NULL)
return -ENOMEM;
+ mtd->name = name;
result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len,
name);
--
2.0.4
prev parent reply other threads:[~2014-09-03 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 11:13 [PATCH 0/6] staging: goldfish: fix coding style warnings Loic Pefferkorn
2014-09-03 11:13 ` [PATCH 1/6] staging: goldfish: suppress consecutive blank lines Loic Pefferkorn
2014-09-03 11:13 ` [PATCH 2/6] staging: goldfish: remove useless space after a cast Loic Pefferkorn
2014-09-03 11:13 ` [PATCH 3/6] staging: goldfish: document spinlock usage Loic Pefferkorn
2014-09-03 12:13 ` One Thousand Gnomes
2014-09-03 16:25 ` Loic Pefferkorn
2014-09-03 11:13 ` [PATCH 4/6] staging: goldfish: fix alignment to match open parenthesis Loic Pefferkorn
2014-09-03 11:13 ` [PATCH 5/6] staging: goldfish: document mutex usage Loic Pefferkorn
2014-09-03 11:13 ` Loic Pefferkorn [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=1409742827-6048-7-git-send-email-loic@loicp.eu \
--to=loic@loicp.eu \
--cc=alan@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.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
all inboxes | Powered by JetHome®