[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1409775795-12521-7-git-send-email-loic@loicp.eu>
Date: Wed, 3 Sep 2014 22:23:15 +0200
From: Loic Pefferkorn <loic@...cp.eu>
To: gregkh@...uxfoundation.org, alan@...ux.intel.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 6/6] staging: goldfish: avoid multiple assignments
Coding style: avoid multiple assignments
Signed-off-by: Loic Pefferkorn <loic@...cp.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 c6c85d3..d68f216 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -329,9 +329,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists