diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-11-02 23:59:40 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-02 23:59:40 -0500 |
commit | 0fea0e9a9c72dab526447895605fc236c87c2726 (patch) | |
tree | cac0f23b68f65d14763ccd9e7d49973f8acade74 /drivers/input/mouse | |
parent | 8ff22ea7d29d99b3dbec08fd541eb406c6775ec1 (diff) | |
download | blackbird-op-linux-0fea0e9a9c72dab526447895605fc236c87c2726.tar.gz blackbird-op-linux-0fea0e9a9c72dab526447895605fc236c87c2726.zip |
Input: logips2pp - handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 8a4f862709e7..d3ddea26b8ca 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c @@ -328,6 +328,7 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties) unsigned char model, buttons; const struct ps2pp_info *model_info; int use_ps2pp = 0; + int error; param[0] = 0; ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); @@ -393,8 +394,14 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties) psmouse->set_resolution = ps2pp_set_resolution; psmouse->disconnect = ps2pp_disconnect; - device_create_file(&psmouse->ps2dev.serio->dev, - &psmouse_attr_smartscroll.dattr); + error = device_create_file(&psmouse->ps2dev.serio->dev, + &psmouse_attr_smartscroll.dattr); + if (error) { + printk(KERN_ERR + "logips2pp.c: failed to create smartscroll " + "sysfs attribute, error: %d\n", error); + return -1; + } } } |