From: dtor@insightbb.com (Dmitry Torokhov)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] HDAPS: handle errors from
Date: Wed, 02 Aug 2006 02:37:30 +0000 [thread overview]
Message-ID: <200608012237.30591.dtor@insightbb.com> (raw)
Compile-tested only (do not have the hardware)
--
Dmitry
HDAPS: handle errors from input_register_device()
Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
---
drivers/hwmon/hdaps.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Index: work/drivers/hwmon/hdaps.c
=================================--- work.orig/drivers/hwmon/hdaps.c
+++ work/drivers/hwmon/hdaps.c
@@ -587,7 +587,9 @@ static int __init hdaps_init(void)
input_set_abs_params(hdaps_idev, ABS_Y,
-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
- input_register_device(hdaps_idev);
+ ret = input_register_device(hdaps_idev);
+ if (ret)
+ goto out_idev;
/* start up our timer for the input device */
init_timer(&hdaps_timer);
@@ -598,6 +600,8 @@ static int __init hdaps_init(void)
printk(KERN_INFO "hdaps: driver successfully loaded.\n");
return 0;
+out_idev:
+ input_free_device(hdaps_idev);
out_group:
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
out_device:
next reply other threads:[~2006-08-02 2:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 2:37 Dmitry Torokhov [this message]
2006-08-02 7:39 ` [lm-sensors] [PATCH] HDAPS: handle errors from Jean Delvare
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=200608012237.30591.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.