Skip to content

Commit

Permalink
Input: logips2pp - handle sysfs errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Jeff Garzik authored and Dmitry Torokhov committed Nov 3, 2006
1 parent 8ff22ea commit 0fea0e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/input/mouse/logips2pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 0fea0e9

Please sign in to comment.