From: Denis Carikli <denis@eukrea.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv6][ 1/5] video: mx3fb: Use devm_kzalloc
Date: Wed, 26 Feb 2014 09:59:55 +0000 [thread overview]
Message-ID: <1393408800-8946-1-git-send-email-denis@eukrea.com> (raw)
Replace kzalloc by devm_kzalloc and remove the kfree() calls.
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Eric Bénard <eric@eukrea.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v5->v6:
- New patch needed by "video: mx3fb: Add device tree suport."
---
drivers/video/mx3fb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 142e860..ee95de8 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -1496,7 +1496,7 @@ static int mx3fb_probe(struct platform_device *pdev)
if (!sdc_reg)
return -EINVAL;
- mx3fb = kzalloc(sizeof(*mx3fb), GFP_KERNEL);
+ mx3fb = devm_kzalloc(&pdev->dev, sizeof(*mx3fb), GFP_KERNEL);
if (!mx3fb)
return -ENOMEM;
@@ -1542,7 +1542,6 @@ ersdc0:
dmaengine_put();
iounmap(mx3fb->reg_base);
eremap:
- kfree(mx3fb);
dev_err(dev, "mx3fb: failed to register fb\n");
return ret;
}
@@ -1561,7 +1560,6 @@ static int mx3fb_remove(struct platform_device *dev)
dmaengine_put();
iounmap(mx3fb->reg_base);
- kfree(mx3fb);
return 0;
}
--
1.7.9.5
next reply other threads:[~2014-02-26 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 9:59 Denis Carikli [this message]
2014-02-26 9:59 ` [PATCHv6][ 2/5] video: mx3fb: Add device tree suport Denis Carikli
2014-02-26 9:59 ` [PATCHv6][ 3/5] video: mx3fb: Introduce regulator support Denis Carikli
2014-02-26 10:20 ` [PATCHv6][ 3/5] video: mx3fb: Introduce r =?UTF-8?B?ZWd1bGF0b3Igc3Vwc Alexander Shiyan
2014-02-26 11:40 ` [PATCHv6][ 3/5] video: mx3fb: Introduce regulator support Denis Carikli
2014-02-26 9:59 ` [PATCHv6][ 4/5] ARM: dts: i.MX35: Add display support Denis Carikli
2014-02-26 9:59 ` [PATCHv6][ 5/5] ARM: dts: mbimxsd35 Add video and displays support Denis Carikli
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=1393408800-8946-1-git-send-email-denis@eukrea.com \
--to=denis@eukrea.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).