From: Ben Dooks <ben-linux@fluff.org>
To: akpm@linux-foundation.org, linux-fbdev-devel@lists.sourceforge.net
Cc: Ben Dooks <ben-linux@fluff.org>
Subject: ILI9320: Ensure resource cleanup on exit.
Date: Tue, 24 Jun 2008 19:23:35 +0100 [thread overview]
Message-ID: <20080624182334.934251023@fluff.org.uk> (raw)
[-- Attachment #1: simtec/simtec-ili9320-fixes.patch --]
[-- Type: text/plain, Size: 1270 bytes --]
Ensure we free our 'struct ili9320' on exit or error.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.26-rc7-quilt1/drivers/video/backlight/ili9320.c
===================================================================
--- linux-2.6.26-rc7-quilt1.orig/drivers/video/backlight/ili9320.c 2008-06-24 12:58:38.000000000 +0100
+++ linux-2.6.26-rc7-quilt1/drivers/video/backlight/ili9320.c 2008-06-24 14:33:30.000000000 +0100
@@ -259,18 +259,19 @@ int __devinit ili9320_probe_spi(struct s
lcd_device_unregister(lcd);
err_free:
- kfree(lcd);
+ kfree(ili);
+
return ret;
}
EXPORT_SYMBOL_GPL(ili9320_probe_spi);
-int __devexit ili9320_remove(struct ili9320 *lcd)
+int __devexit ili9320_remove(struct ili9320 *ili)
{
- ili9320_power(lcd, FB_BLANK_POWERDOWN);
+ ili9320_power(ili, FB_BLANK_POWERDOWN);
- lcd_device_unregister(lcd->lcd);
- kfree(lcd);
+ lcd_device_unregister(ili->lcd);
+ kfree(ili);
return 0;
}
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
reply other threads:[~2008-06-24 18:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080624182334.934251023@fluff.org.uk \
--to=ben-linux@fluff.org \
--cc=akpm@linux-foundation.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).