From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>,
Samuel Ortiz <sameo@linux.intel.com>,
Richard Purdie <rpurdie@linux.intel.com>
Subject: [PATCH] max8925_bl: properly unregisters a backlight device object in error handling
Date: Mon, 10 May 2010 09:27:34 +0800 [thread overview]
Message-ID: <1273454854.6536.3.camel@mola> (raw)
Properly unregisters a previously registered backlight device object in error handling of max8925_backlight_probe.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/video/backlight/max8925_bl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c
index b5accc9..b2b2c7b 100644
--- a/drivers/video/backlight/max8925_bl.c
+++ b/drivers/video/backlight/max8925_bl.c
@@ -162,6 +162,7 @@ static int __devinit max8925_backlight_probe(struct platform_device *pdev)
backlight_update_status(bl);
return 0;
out:
+ backlight_device_unregister(bl);
kfree(data);
return ret;
}
--
1.5.4.3
reply other threads:[~2010-05-10 1:27 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=1273454854.6536.3.camel@mola \
--to=axel.lin@gmail.com \
--cc=haojian.zhuang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
--cc=sameo@linux.intel.com \
/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